Laravel: Sanctum

First, install with Composer composer require laravel/sanctum Then, run php artisan vendor:publish --provider="Laravel\Sanctum\SanctumServiceProvider"

In,  file, uncomment  ,

Next, in, add   to protect route with Laravel Sanctum

To issue token,

To revoke token,

Reference

 * https://laravel.com/docs/8.x/sanctum