Laravel 5 Destroy all user sessions and force logo

2019-05-11 08:32发布

问题:

Is there a way to destroy all sessions? I need to logout all users and wondering if this is possible with astrisan?

Thank you!

回答1:

it's really depend on with session drive you picked.

  • 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,

for any other drive you can do that like others.



回答2:

You can do that by deleting all files under this path

storage/framework/sessions