We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 63917d8 commit 4c68478Copy full SHA for 4c68478
1 file changed
src/Models/Broadcasts.php
@@ -21,7 +21,13 @@ trait Broadcasts
21
22
public static function bootBroadcasts(): void
23
{
24
- static::observe(new ModelObserver);
+ if (method_exists(static::class, 'whenBooted')) {
25
+ static::whenBooted(function () {
26
+ static::observe(new ModelObserver);
27
+ });
28
+ } else {
29
30
+ }
31
}
32
33
public static function withoutTurboStreamBroadcasts(callable $callback)
0 commit comments