Laravel 5.2: Auth::logout() 失效

Posted by Nathan on 2017-09-19

解决办法: 1、手动添加一条路由:

Route::get(‘auth/logout’, ‘Auth\AuthController@logout’);

2、在AuthController中构造器中增加以下代码:

public function __construct()
{
$this->middleware(‘guest’, [‘except’ => [‘logout’, ‘getLogout’]]);
}