manually logout user laravel code example
Example 1: laravel force user logout
if (!Auth::user()->isActive()) {
Auth::logout();
return Redirect::home();
}
Example 2: laravel logout all users
rm -rf storage/framework/sessions/*
if (!Auth::user()->isActive()) {
Auth::logout();
return Redirect::home();
}
rm -rf storage/framework/sessions/*