Skip to content

Commit 0084c3f

Browse files
committed
Add warning to events and echo page that listeners are not dynamic.
1 parent 35add2f commit 0084c3f

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

events.blade.php

+4
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,10 @@ protected function getListeners()
8080
@endslot
8181
@endcomponent
8282

83+
@component('components.warning')
84+
<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.
85+
@endcomponent
86+
8387
## Passing Parameters {#passing-parameters}
8488

8589
You can also send parameters with an event emission.

laravel-echo.blade.php

+4
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,10 @@ public function notifyNewOrder()
8686
@endslot
8787
@endcomponent
8888

89+
@component('components.warning')
90+
<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.
91+
@endcomponent
92+
8993
Now, Livewire will intercept the received event from Pusher, and act accordingly.
9094

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

0 commit comments

Comments
 (0)