/** * 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); }
/** * 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()); }