Php Laravel 5注销或会话销毁
我在注销laravel 5.1应用程序时遇到问题-我认为问题在于会话没有被破坏 我的问题几乎与以下相同: 我的解决方案是使用Php Laravel 5注销或会话销毁,php,laravel,Php,Laravel,我在注销laravel 5.1应用程序时遇到问题-我认为问题在于会话没有被破坏 我的问题几乎与以下相同: 我的解决方案是使用 session_unset(); 而不是 Session::flush(); 因此,我注销laravel 5.1应用程序的工作解决方案是: public function getLogout() { \Auth::logout(); session_unset(); return redirect(property_exists($this,
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()代码>和会话()->忘记('db')代码>不工作 你能试试这个吗:
Auth::logout();
Session::flush();
如果它不工作,请检查Config->Session.php中的“'driver'=>'file'”
或“'domain'=>null”
部分。试试这段代码
Auth::logout();
或
或
试试这个代码
使用Illumb\Support\Facades\Session
会话::flush();不起作用。session_unset();确实有效。驱动程序设置为文件,域设置为空。我想知道这是否是我的开发环境,这使我需要建立一个不同的开发环境。我将尝试在本周六通过Skype帮助您。你能把我加入skype吗:alierdemsunar。
session_unset();
Session::flush();
public function logout()
{
Auth::logout();
Session::flush();
return redirect('/login');
}