public function update(ReminderUpdateRequest $request)
{
$password = $request->get('new_password');
$token = $request->get('token');
try {
\DB::beginTransaction();
$tokenData = $this->reminderService->getByToken($token);
if (isset($tokenData->user_id)) {
$user = $this->userService->getById($tokenData->user_id);
} else {
\App::abort(500);
}
$this->authService->attemptResetPassword($user->username, $password);
$this->reminderService->delete($tokenData->id);
\DB::commit();
} catch (\Exception $e) {
\DB::rollback();
\App::abort(500);
}
return view('password.complete');
}