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

abdulrehman176617's avatar

Laravel 12 + Livewire 3 + Reverb: Broadcast event not triggering Livewire listener

Hi everyone,

I'm building a chat app in Laravel 12 with Livewire 3 and Reverb.

My event is broadcasting fine, but my Livewire function never fires.

Here’s my Livewire listener:

#[On('echo:chat,SendMessageEvent')]
public function newChatMessageNotification($message)
{
    Log::info("Received message via Echo: " . json_encode($message));
}

And here’s what I see in the Reverb logs:

Message Received ............................................................................................................. 340478909.354382986

   1▕ {
   2▕     "event": "pusher:subscribe",
   3▕     "data": {
   4▕         "auth": "",
   5▕         "channel": "chat"
   6▕     }
   7▕ }

Broadcasting To ............................................................................................................................. chat
{
    "event": "SendMessageEvent",
    "data": {
        "id": 87,
        "sender_id": 2,
        "receiver_id": 1,
        "message": "6"
    },
    "channel": "chat"
}

js code

import Echo from "laravel-echo";
import Pusher from "pusher-js";

window.Pusher = Pusher;

window.Echo = new Echo({
    broadcaster: "reverb",
    key: import.meta.env.VITE_REVERB_APP_KEY,
    wsHost: import.meta.env.VITE_REVERB_HOST,
    wsPort: import.meta.env.VITE_REVERB_PORT,
    forceTLS: false,
    enabledTransports: ["ws"],
    authEndpoint: "/broadcasting/auth",
    auth: {
        headers: {
            "X-CSRF-TOKEN": document
                .querySelector('meta[name="csrf-token"]')
                .getAttribute("content"),
        },
    },
});
1 like
3 replies
abdulrehman176617's avatar

The function newChatMessageNotification is not firing when a message is sent, even though the Reverb log shows the event firing

1 like
abdulrehman176617's avatar

#[On('echo:chat,.SendMessageEvent')]

solution add a dot in front of you event name , i my case like this '.SendMessageEvent'

1 like
vincent15000's avatar

Have you extended the SendMessageEvent class with ShouldBroadcastNow ?

Please or to participate in this conversation.