/** * 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'); }
/** * 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'); }