BroadcastsEventsAfterCommit
trait BroadcastsEventsAfterCommit (View source)
Traits
Methods
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
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.