Refactor auth controllers to be cleaner and easier to maintain

This commit is contained in:
Dane Everitt 2018-04-07 12:35:15 -05:00
parent 324b989a29
commit 4f3c668420
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
7 changed files with 275 additions and 203 deletions

View file

@ -29,4 +29,17 @@ class ForgotPasswordController extends Controller
return $this->sendResetLinkResponse(Password::RESET_LINK_SENT);
}
/**
* Get the response for a successful password reset link.
*
* @param string $response
* @return \Illuminate\Http\RedirectResponse|\Illuminate\Http\JsonResponse
*/
protected function sendResetLinkResponse($response)
{
return response()->json([
'status' => trans($response),
]);
}
}