I'm doing an app using Laravel, and I'm doing a login system.
In login I don't have any problem, but in logout the browser gets an error
Whoops, looks like something went wrong.
My login function
public function postSignin() {
if (Auth::attempt(array('email'=>Input::get('email'), 'password'=>Input::get('password')))) {
return Redirect::to('users/dashboard')->with('message', 'You are now logged in!');
} else {
return Redirect::to('users/login')
->with('message', 'Your username/password combination was incorrect')
->withInput();
}
}
My logout function
public function getLogout() {
Auth::logout();
return Redirect::to('users/login')->with('message', 'Your are now logged out!');
}
If I remove the line Auth::logout();
the page is redirected but I can't use the Auth::check()
to verify the if the user is logged in.
After having the error Whoops, looks like something went wrong.
if I refresh the page the redirect is done properly.
Any clue what the problem is?
Edited:
The error is just that