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