在Laravel 5.3中注销后,没有优雅的解决方案可以重定向到特定页面吗?
正在调用的函数来自trait AuthenticatesUsers:
public function logout(Request $request)
{
$this->guard()->logout();
$request->session()->flush();
$request->session()->regenerate();
return redirect('/');
}
This is a default function from the core of laravel. So I have to override the whole function I cannot edit the core. But isn't there a more simpler solution, cause it feel like overkill to manually logout, flush and regenerate again.
在一篇文章中找到了答案: