5 months ago

Why does public broadcast work even without defining Channel?

Posted 5 months ago by thebigk

I've began working on Laravel Broadcasting with Pusher and I created a very simple setup -

  1. Created an event called "MessageReceived".
  2. The event implements ShouldBroadcast.
  3. In the event class, I've the following -
public function broadcastOn()
        return new Channel('ce-1');
  1. I've configured Pusher properly. When I trigger the event, Pusher automatically receives the payload.

What surprises me is that in my routes/channels.php, I've not defined anything. In fact I've commented out everything inside channels.php and yet, Pusher's console receives the event information.

Why is the channels.php being skipped in this process?

Please sign in or create an account to participate in this conversation.