I'm trying to setup a laravel api to work with a vue spa. API endpoints protected with auth:sanctum middleware only work when I add web middleware to them, which I don't think is right. Please help
I'm trying to setup a laravel api to work with a vue spa. API endpoints protected with auth:sanctum middleware only work when I add web middleware to them, which I don't think is right. Please help
False alarm, I had forgotten to add
\Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
in app/Http/Kernel.php