Ejemplo n.º 1
0
 /**
  * @param PostLoginRequest $request
  * @param Guard            $guard
  *
  * @return \Illuminate\Http\RedirectResponse
  */
 public function postLogin(PostLoginRequest $request, Guard $guard)
 {
     $input = $request->get('login');
     if ($guard->viaRemember() || $guard->attempt(['email' => $input['email'], 'password' => $input['password']], isset($input['remember_me']) ? true : false)) {
         return redirect()->back();
     }
     return redirect()->route('general::guest::getLogin');
 }
Ejemplo n.º 2
0
 /**
  * Determine if the user was authenticated via "remember me" cookie.
  *
  * @return bool 
  * @static 
  */
 public static function viaRemember()
 {
     return \Illuminate\Auth\Guard::viaRemember();
 }