Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

laravel sanctum

// Revoke all tokens...
$user->tokens()->delete();

// Revoke the token that was used to authenticate the current request...
$request->user()->currentAccessToken()->delete();

// Revoke a specific token...
$user->tokens()->where('id', $tokenId)->delete();
Source by laravel.com #
 
PREVIOUS NEXT
Tagged: #laravel #sanctum
ADD COMMENT
Topic
Name
5+2 =