I upgraded my laravel 8 backend for SPA (vue.js, sanctum) to laravel 11, and post request /broadcasting/auth returns HTML response instead of json like { auth: "..." }
In previous version Broadcast::routes has been called from BroadcastServiceProvider, but not is it under the hood of laravel framework in ApplicationBuilder.php, and previously I've added sanctum middleware like this Broadcast::routes(['middleware' => ['auth:sanctum']]);
How should I do it in laravel 11?