Assume, you have created passport API authentication in your Laravel 10 application and now you want to create a perfect logout system in Laravel passport. In this tutorial, I will show you laravel 10 passport logout system. We will create a laravel passport logout system that can be able to logout other devices.

I will share this revoke token laravel passport code. To create this laravel passport logout system, we have to revoke the token. To create this revoke token, the passport provides the revoke() method. So let's see the code of revoke token in laravel passport.


namespace App\Http\Controllers;

use Illuminate\Http\Request;

class AuthController extends Controller

    public function logout()

        return response()->json([
            'success' => 'logged out'


Read also: Laravel 10 Passport API Permission Using Scope



Now we know revoke token laravel passport. Hope this laravel passport logout example tutorial will help you to handle laravel passport logout other devices.

Category : #laravel

Tags : #laravel , #laravel api