diff --git a/broadcasting.md b/broadcasting.md index 1f22837e39..2ab33065e4 100644 --- a/broadcasting.md +++ b/broadcasting.md @@ -777,7 +777,15 @@ class ServerCreated implements ShouldBroadcast, ShouldDispatchAfterCommit Private channels require you to authorize that the currently authenticated user can actually listen on the channel. This is accomplished by making an HTTP request to your Laravel application with the channel name and allowing your application to determine if the user can listen on that channel. When using [Laravel Echo](#client-side-installation), the HTTP request to authorize subscriptions to private channels will be made automatically. -When broadcasting is enabled, Laravel automatically registers the `/broadcasting/auth` route to handle authorization requests. The `/broadcasting/auth` route is automatically placed within the `web` middleware group. +When broadcasting is installed Laravel attempts to automatically register the `/broadcasting/auth` route to handle authorization requests. If Laravel fails to automatically register these routes, you may register them manually in your application's `/bootstrap/app.php` file: + +```php +->withRouting( + web: __DIR__.'/../routes/web.php', + channels: __DIR__.'/../routes/channels.php', + health: '/up', +) +``` ### Defining Authorization Callbacks