#321

The Broadcast::routes method will automatically place its routes within the web middleware group so that should work. In some weird cases you may have to hardcode the route in the Laravel Echo Configuration as follows:

window.Echo = new Echo({
broadcaster: ‘pusher’,
// …
authEndpoint: ‘/custom/endpoint/auth’
});

If you are in local development you can write authEndpoint as follows:

window.Echo = new Echo({
broadcaster: ‘pusher’,
// …
authEndpoint: ‘http://localhost/YourAppName/public/broadcasting/auth’
});

This only matters if you need authorizing request into the route which means you are probably using a private channel from your request. If there is no need for private channel just switch to public channel.

Please check this documentation from Laravel on Broadcasting under Authorizing Channels