Skip to content

Instantly share code, notes, and snippets.

@Nickstr
Created May 4, 2012 08:16
Show Gist options
  • Save Nickstr/2593216 to your computer and use it in GitHub Desktop.
Save Nickstr/2593216 to your computer and use it in GitHub Desktop.
AUTH + CHECK + LOGOUT
// Login controller
public function get_inloggen()
{
Return View::make('back/login');
}
public function post_inloggen()
{
if (Auth::attempt(Input::get('email'), Input::get('password')))
{
return Redirect::to(Session::get('previous'));
} else {
return Redirect::to('gebruiker/inloggen');
}
}
public function get_uitloggen()
{
Auth::logout();
return Redirect::to('/');
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment