Answers for "how to logout current user in laravel"

PHP
3

current loggedin user laravel

$user = auth()->user();  print($user->id);print($user->name);print($user->email);
Posted by: Guest on May-26-2020
0

logout all users laravel 8

for database session
I am updating all users remember tokens to blank and then flushing stored 
session by truncate the sessions table.
  
DB::table('users')->update(array(
    'remember_token' => '',
    'logout_at' => Carbon::now()->toDateTimeString())
);
Session::flush();
Posted by: Guest on April-19-2021

Browse Popular Code Answers by Language