D. Oussama D. Oussama - 1 year ago 25
PHP Question

Disconnect a specific user

I am currently using laravel 5.4, i get the list of online users, and i want from my admin-dashboard to make a specific user from my list to disconnect,
is there a way to do so ?

btl btl
Answer Source

Set a flag in the database, for example, to mark the user as needing to logout. Then on their next request, in say a middleware, you can do:

if (Auth::user()->should_logout) {
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download