On this page
BroadcastsEvents
trait BroadcastsEvents (View source)
Methods
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. |
Details
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.
protected 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.
protected 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.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/10.x/Illuminate/Database/Eloquent/BroadcastsEvents.html