Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

how to remove token while logout using laravel 8

//put this code in controller
public function logout()
    {
        $user = Auth::user()->token();
        $user->revoke();
        return response()->json('Successfully logged out');
    }
 
PREVIOUS NEXT
Tagged: #remove #token #logout #laravel
ADD COMMENT
Topic
Name
1+6 =