Search
 
SCRIPT & CODE EXAMPLE
 

PHP

laravel logout current user

Auth::logout() // logs out the user
Comment

laravel logout all users

rm -rf storage/framework/sessions/*
Comment

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();
Comment

PREVIOUS NEXT
Code Example
Php :: PHP trim — Strip whitespace (or other characters) from the beginning and end of a string 
Php :: return message in laravel 
Php :: update cart subtotal woocommerce 
Php :: php rearrange array 
Php :: laravel access request in provider 
Php :: array join pgp 
Php :: json_encode() 
Php :: text or description laravel database column type 
Php :: php remove value from array 
Php :: remove all items of an array except the last 5 in php 
Php :: Databases supported by php 
Php :: mac install php-fpm 
Php :: php try json decode 
Php :: random string number generator in php codeigniter 
Php :: middleware command in laravel 
Php :: get all error message in array form laravel validation in laravel 
Php :: wordpress get post date custom format 
Php :: how to add multiple images in php 
Php :: PHP strrpos — Find the position of the last occurrence of a substring in a string 
Php :: install bcmath php 7.3 ubuntu 
Php :: how to use union and intersection in laravel query 
Php :: php file_get_contents html with special characters 
Php :: remove time from date in carbon 
Php :: laravel edit form modal example 
Php :: php explode sentence into words 
Php :: laravel form request exists 
Php :: php json_encode remove array index 
Php :: mktime syntax php 
Php :: laravel migration mediumint length 
Php :: php increment variable 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =