4
我遇到了从laravel 5.1应用程序注销的问题 - 我相信问题是会话不会被销毁。Laravel 5注销或会话销毁
我的问题是几乎相同的:
Laravel 5 Auth Logout not destroying session
与我的解决方法是使用
session_unset();
而不是
Session::flush();
,所以我的工作解决了警告注销一个laravel 5.1应用程序是:
public function getLogout()
{
\Auth::logout();
session_unset();
return redirect(property_exists($this, 'redirectAfterLogout') ? $this->redirectAfterLogout : '/');
//these attempts will not remove values from the session.....
//session()->forget('db');
//\Session::flush();
}
任何想法为什么\Session::flush();
和session()->forget('db');
不工作?
Session :: flush();不起作用。 session_unset();确实有效。驱动程序设置为文件,域设置为空。我想知道这是否是我的开发环境,这使我可以建立一个不同的开发环境。 – Iannazzi
我会尽力在这个星期六通过Skype帮助你。你可以加我skype:alierdemsunar。 –