@user1980 if you are storing session data in database, then you could just truncate session data and that will invalidate user sessions (and log them out on their next page request).
Nov 19, 2020
7
Level 4
How to log out all users site wide?
Hello,
How to logout all users site wide in laravel 6 please?
Thank you.
Level 14
If you regenerate key in .env then it should did the trick:
php artisan key:generate
This will also logout user with remember me.
Deleting only database table if you are using database sessions or deleting sessions files, will not logout users that login with remember me.
If there are other implications to consider using this approuch depend on your project, since this will break all encryption, so pay attention to this.
3 likes
Please or to participate in this conversation.