Exemple #1
0
 public function postLogin(LoginRequest $request)
 {
     $credentials = ['email' => $request->email, 'password' => $request->password];
     $remember = (bool) $request->get('remember_me', false);
     $error = $this->auth->login($credentials, $remember);
     if (!$error) {
         flash()->success(trans('user::messages.successfully logged in'));
         return redirect()->intended(route(config('asgard.user.users.redirect_route_after_login')));
     }
     flash()->error($error);
     return redirect()->back()->withInput();
 }
Exemple #2
0
 public function postLogin(LoginRequest $request)
 {
     $credentials = ['email' => $request->email, 'password' => $request->password];
     $remember = (bool) $request->get('remember_me', false);
     $error = $this->auth->login($credentials, $remember);
     if (!$error) {
         Flash::success(trans('user::messages.successfully logged in'));
         return redirect()->intended('/');
     }
     Flash::error($error);
     return redirect()->back()->withInput();
 }