Laravel 5销毁所有用户会话并强制注销 [英] Laravel 5 Destroy all user sessions and force logout
本文介绍了Laravel 5销毁所有用户会话并强制注销的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
是否有办法销毁所有会话?我需要注销所有用户,并且想知道使用astrisan是否可以做到这一点?
Is there a way to destroy all sessions? I need to logout all users and wondering if this is possible with astrisan?
谢谢!
推荐答案
这实际上取决于您选择的会话驱动器.
it's really depend on with session drive you picked.
- 如果使用文件驱动器,则可以删除
storage/framework/sessions
路径 - 如果您使用数据库驱动器,则可以删除会话表的所有行,
- 如果您使用redis驱动程序,并且您的缓存驱动程序也是redis,则可以运行
php artisan cache:clear
- if you using file drive you can delete
storage/framework/sessions
path - if you using database drive you can delete all rows of session table,
- if you using redis driver and also your cache driver is redis , you can run
php artisan cache:clear
对于任何其他驱动程序,您都可以像其他驱动程序一样进行.
for any other driver you can do that like others.
这篇关于Laravel 5销毁所有用户会话并强制注销的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文