middleware('guest:frontend')->except('logout'); } /** * Get the guard to be used during authentication. * * @return \Illuminate\Contracts\Auth\StatefulGuard */ protected function guard(): StatefulGuard { return Auth::guard('frontend'); } /** * Show the application's login form. * * @return \Illuminate\View\View */ public function showLoginForm(): View { // * Fetch Coupon list (campaign wall) $brList = Cache::remember('allbrs', 60, fn () => MesBrController::getStaticBr()); $gameModel = Game::query()->where('published', true)->first(); return view('fo.auth.login', compact('brList', 'gameModel')); } /** * The user has been authenticated. * * @param \Illuminate\Http\Request $request * @param \Illuminate\Database\Eloquent\Model $user * @return void * @phpcs:disable Squiz.Commenting.FunctionComment.TypeHintMissing, Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClassBeforeLastUsed */ protected function authenticated(Request $request, Model $user): void { $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 void * @phpcs:disable Generic.CodeAnalysis.UnusedFunctionParameter.FoundInExtendedClass */ protected function loggedOut(Request $request): void { Session::flash('info', trans('Vous êtes à présent déconnecté')); } /** * Get the post register / login redirect path. * * @return string */ public function redirectPath(): string { return response()->redirectToIntended()->getTargetUrl(); } }