Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

matthes's avatar

Echo broadcast event listener not being triggered

I'm currently trying to set up broadcasting via Pusher in Laravel 5.3 and have come across a problem with laravel-echo. When pushing something using the Pusher console to my private channel, I can see the event being received by looking at the received frames:

https://i.imgur.com/fu3GBbe.png

My event handler is listening for the "CriticalStateCreated" event:

import Echo from "laravel-echo"

window.Echo = new Echo({
    broadcaster: 'pusher',
    key: 'redacted',
    cluster: 'eu'
});

window.Echo.private('critical-states')
    .listen('CriticalStateCreated', (e) => {
        console.log(e);
    });

So I know that Echo is successfully receiving incoming Pusher broadcasts and the event name matches my event handler. Why don't I see anything in my debug console?

0 likes
3 replies
matthes's avatar

After a break (and beer) I finally found the solution: I forgot the namespace. From the Pusher console you have to add App\ (or you custom namespace) in front of the Event.

davejitsu's avatar

I was having this issue today and it's actually App\Events\ before the name of your actual broadcast event. If you don't specify a namespace when instantiating Echo, anyway.

jurjen's avatar

The default namespace Echo uses is App.Events. The backslashes in your event class name are converted to dots. So when using subfolders for your events Echo should listen to Subfolder.Classname.

1 like

Please or to participate in this conversation.