Skip to content

Instantly share code, notes, and snippets.

@Tjoosten
Created December 27, 2014 04:44
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Tjoosten/89d168318600c2ad3185 to your computer and use it in GitHub Desktop.
Save Tjoosten/89d168318600c2ad3185 to your computer and use it in GitHub Desktop.
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