BroadcastsEvents
trait BroadcastsEvents
Methods
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.
Details
at line 18
static void
bootBroadcastsEvents()
Boot the event broadcasting trait.
at line 46
PendingBroadcast|null
broadcastCreated(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was created.
at line 58
PendingBroadcast|null
broadcastUpdated(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was updated.
at line 70
PendingBroadcast|null
broadcastTrashed(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was trashed.
at line 82
PendingBroadcast|null
broadcastRestored(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was restored.
at line 94
PendingBroadcast|null
broadcastDeleted(Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast that the model was deleted.
at line 106
protected PendingBroadcast|null
broadcastIfBroadcastChannelsExistForEvent(BroadcastableModelEventOccurred $instance, string $event, Channel|HasBroadcastChannel|array|null $channels = null)
Broadcast the given event instance if channels are configured for the model event.
at line 125
BroadcastableModelEventOccurred
newBroadcastableModelEvent(string $event)
Create a new broadcastable model event event.
at line 145
protected BroadcastableModelEventOccurred
newBroadcastableEvent(string $event)
Create a new broadcastable model event for the model.
at line 153
Channel|array
broadcastOn(string $event)
Get the channels that model events should broadcast on.
at line 161
string|null
broadcastConnection()
Get the queue connection that should be used to broadcast model events.
at line 169
string|null
broadcastQueue()
Get the queue that should be used to broadcast model events.
at line 177
bool
broadcastAfterCommit()
Determine if the model event broadcast queued job should be dispatched after all transactions are committed.