In my api routes file, I\'ve written the following code following the documentation (https://laravel.com/docs/8.x/sanctum#introduction
api