laravel 如何刷新laravel中的所有会话

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/31823167/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-14 12:07:28  来源:igfitidea点击:

How to flush all session in laravel

laravellaravel-5

提问by LoveZero

I need to flush all user sessions after a migration, but the session keep persists even after I had try

我需要在迁移后刷新所有用户会话,但即使在我尝试后会话仍然存在

  • session()->flush();
  • Session::flush();
  • session()->flush();
  • 会话::刷新();

Any idea how should I remove all the session? will deleting all the files in storage/framework/sessions help?

知道我应该如何删除所有会话吗?删除存储/框架/会话中的所有文件有帮助吗?

回答by ARIF MAHMUD RANA

If you are using file based session then you have to delete all files from storage/framework/sessions& nullremember_tokenfield from users table

如果您使用基于文件的会话,那么您必须从用户表中的storage/framework/sessionsremember_token字段中删除所有文件null