Created
December 27, 2014 04:44
-
-
Save Tjoosten/89d168318600c2ad3185 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Login() { | |
if(Auth::attempt(array('email' => Input::get('email'), 'password' => Input::get('password')))) { | |
return Redirect::to($_SERVER['HTTP_REFERER']) | |
->with('message', 'You are now logged in!'); | |
} else { | |
return Redirect::to($_SERVER['HTTP_REFERER']) | |
->with('message', 'Your username/password combination was incorrect') | |
->withInput(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment