Exemplo n.º 1
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $this->loginForm->validate($input = Input::only('email', 'password'));
     if (Auth::attempt($input)) {
         return Redirect::intended('/');
     }
     return Redirect::back()->withInput()->withFlashMessage('Invalid credentials provided');
 }
Exemplo n.º 2
0
 /**
  * Store a newly created resource in storage.
  *
  * @return Response
  */
 public function store()
 {
     $this->loginForm->validate($input = Input::only('email', 'password'));
     if (Auth::attempt($input)) {
         $this->sessionManager->setupSession(Auth::user());
         return Redirect::intended('/');
     }
     return Redirect::back()->withInput()->withErrors('Invalid credentials provided');
 }