Skip to content

Commit 4f05683

Browse files
authored
Add note about model broadcasting/listening
1 parent 52f2c40 commit 4f05683

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

laravel-echo.blade.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,11 @@ public function notifyNewOrder()
9090
<code>getListeners()</code> will only dynamically generate the names of listeners when the component is mounted. Once the listeners are setup, these can't be changed.
9191
@endcomponent
9292

93+
@component('components.warning')
94+
Note that if you're using [Model Broadcasting](https://laravel.com/docs/10.x/broadcasting#model-broadcasting), you need to [prefix the event](https://laravel.com/docs/10.x/broadcasting#listening-for-model-broadcasts) with a '.' so that the right event is listened for, like <code>.MessageCreated</code>.
95+
@endcomponent
96+
97+
9398
Now, Livewire will intercept the received event from Pusher, and act accordingly.
9499

95100
## Private & Presence Channels {#private-presence-channels}

0 commit comments

Comments
 (0)