laravel how to remove tokens for user code example
Example: token delete laravel
public function logout() {
Auth::user()->tokens->each(function($token, $key) {
$token->delete();
});
return response()->json('Successfully logged out');
}