예제 #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function update($id)
 {
     $userComponent = new UserComponent(Input::all());
     if ($userComponent->updateStudent($id) == UserComponent::FAILED_VALIDATION) {
         return $this->responseError($userComponent->getMessage(), $userComponent->getErrors());
     }
     return $this->show($id);
 }
예제 #2
0
 /**
  * Remove the specified resource from storage.
  *
  * @param  int $id
  *
  * @return Response
  */
 public function destroy($id)
 {
     $userComponent = new UserComponent();
     $userComponent->destroy($id);
     return $this->responseSuccess($userComponent->getMessage());
 }