public function update(UserUpdateRequest $request)
{
$loginUser = $this->userService->getCurrentUser();
try {
$user = $this->userService->update($loginUser->id, \Input::get('username'), \Input::get('email'), $loginUser->role);
if ($user) {
$this->authService->setUser($user);
return \Redirect::to('user/edit')->with('status', '編集が完了しました。');
} else {
\App::abort(500);
}
} catch (\Exception $e) {
return \Redirect::back()->withErrors(['warning' => 'システムエラーが発生したため編集に失敗しました。'])->withInput();
}
}