How to force logout a user with user ID?

  laravel, laravel-8, laravel-authentication

It is possible to logout a user by user ID?
For login, I got Auth::loginUsingId(1) on the official documentation here

I need the same trick for logout a user manually. Any possible way?

PS : I don’t want to use AppServiceProvider or a middleware for this to check on each request.

Source: Laravel

Leave a Reply