middleware('guest:frontend')->except('logout'); } /** * Get the guard to be used during authentication. * * @return \Illuminate\Contracts\Auth\StatefulGuard */ protected function guard() { return Auth::guard('frontend'); } /** * Show the application's login form. * * @return \Illuminate\View\View */ public function showLoginForm() { return view('fo.auth.login'); } /** * The user has been authenticated. * * @param \Illuminate\Http\Request $request * @param \Illuminate\Database\Eloquent\Model $user * @return mixed * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing, Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed */ protected function authenticated(Request $request, Model $user) { $user->last_connection = \now(); $user->saveOrFail(); Session::flash('info', trans('Vous êtes à présent connecté')); } /** * The user has logged out of the application. * * @param \Illuminate\Http\Request $request * @return mixed * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ protected function loggedOut(Request $request) { Session::flash('info', trans('Vous êtes à présent déconnecté')); } /** * Get the post register / login redirect path. * * @return string */ public function redirectPath() { return response()->redirectToIntended()->getTargetUrl(); } }