trait BroadcastsEvents (View source)
| static void | bootBroadcastsEvents()
Boot the event broadcasting trait. | |
| PendingBroadcast | broadcastCreated(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was created. | |
| PendingBroadcast | broadcastUpdated(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was updated. | |
| PendingBroadcast | broadcastTrashed(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was trashed. | |
| PendingBroadcast | broadcastRestored(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was restored. | |
| PendingBroadcast | broadcastDeleted(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was deleted. | |
| PendingBroadcast|null | broadcastIfBroadcastChannelsExistForEvent(mixed $instance, string $event, mixed $channels = null)
Broadcast the given event instance if channels are configured for the model event. | |
| mixed | newBroadcastableModelEvent(string $event)
Create a new broadcastable model event event. | |
| BroadcastableModelEventOccurred | newBroadcastableEvent(string $event)
Create a new broadcastable model event for the model. | |
| Channel|array | broadcastOn(string $event)
Get the channels that model events should broadcast on. | |
| string|null | broadcastConnection()
Get the queue connection that should be used to broadcast model events. | |
| string|null | broadcastQueue()
Get the queue that should be used to broadcast model events. | |
| bool | broadcastAfterCommit()
Determine if the model event broadcast queued job should be dispatched after all transactions are committed. |
Boot the event broadcasting trait.
Broadcast that the model was created.
Broadcast that the model was updated.
Broadcast that the model was trashed.
Broadcast that the model was restored.
Broadcast that the model was deleted.
Broadcast the given event instance if channels are configured for the model event.
Create a new broadcastable model event event.
Create a new broadcastable model event for the model.
Get the channels that model events should broadcast on.
Get the queue connection that should be used to broadcast model events.
Get the queue that should be used to broadcast model events.
Determine if the model event broadcast queued job should be dispatched after all transactions are committed.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/11.x/Illuminate/Database/Eloquent/BroadcastsEvents.html