我正在用Laravel做一个应用程序,我正在做一个登录系统。在登录时我没有任何问题,但是在注销时浏览器会出错
Whoops, looks like something went wrong.我的登录功能
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();
}
}我的注销功能
public function getLogout() {
Auth::logout();
return Redirect::to('users/login')->with('message', 'Your are now logged out!');
}如果删除行Auth::logout();,则页面将被重定向,但无法使用Auth::check()来验证用户是否已登录。
在有错误Whoops, looks like something went wrong.之后,如果我刷新页面,重定向就会正确地完成。
有什么线索吗?
编辑:
错误就在于

发布于 2014-04-23 13:02:50
如果您使用的是Laravel > 4.1.25,您可能丢失了users表上的remember_token字段。
请参阅:http://laravel.com/docs/upgrade#upgrade-4.1.26
Laravel需要“VARCHAR(100)的可空remember_token、文本或等效于您的users表”。
发布于 2014-07-10 13:56:50
我希望给你这个链接到一个包内建身份验证注册和管理面板与权限处理的帮助。完全可定制:https://github.com/intrip/laravel-authentication-acl
https://stackoverflow.com/questions/23208700
复制相似问题