📜  注销所有用户 laravel 8 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:15.855000             🧑  作者: Mango

代码示例1
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();