php - Laravel login system -
i'm doing app using laravel, , i'm doing login system. in login don't have problem, in logout browser gets error
whoops, looks 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 logged in!'); } else { return redirect::to('users/login') ->with('message', 'your username/password combination incorrect') ->withinput(); } }
my logout function
public function getlogout() { auth::logout(); return redirect::to('users/login')->with('message', 'your logged out!'); }
if remove line auth::logout();
page redirected can't use auth::check()
verify if user logged in.
after having error whoops, looks went wrong.
if refresh page redirect done properly.
any clue problem is?
edited:
the error that
if using laravel version > 4.1.25 may missing remember_token field on users table.
see: http://laravel.com/docs/upgrade#upgrade-4.1.26
laravel requires "nullable remember_token of varchar(100), text, or equivalent users table."
Comments
Post a Comment