trait BroadcastsEventsAfterCommit

Traits

Methods

static void
bootBroadcastsEvents()

Boot the event broadcasting trait.

broadcastCreated(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was created.

broadcastUpdated(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was updated.

broadcastTrashed(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was trashed.

broadcastRestored(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was restored.

broadcastDeleted(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was deleted.

broadcastIfBroadcastChannelsExistForEvent(BroadcastableModelEventOccurred $instance, string $event, Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast the given event instance if channels are configured for the model event.

newBroadcastableModelEvent(string $event)

Create a new broadcastable model event event.

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

in BroadcastsEvents at line 18
static void bootBroadcastsEvents()

Boot the event broadcasting trait.

Return Value

void

in BroadcastsEvents at line 46
PendingBroadcast|null broadcastCreated(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was created.

Parameters

Channel|HasBroadcastChannel|array|null $channels

Return Value

PendingBroadcast|null

in BroadcastsEvents at line 58
PendingBroadcast|null broadcastUpdated(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was updated.

Parameters

Channel|HasBroadcastChannel|array|null $channels

Return Value

PendingBroadcast|null

in BroadcastsEvents at line 70
PendingBroadcast|null broadcastTrashed(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was trashed.

Parameters

Channel|HasBroadcastChannel|array|null $channels

Return Value

PendingBroadcast|null

in BroadcastsEvents at line 82
PendingBroadcast|null broadcastRestored(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was restored.

Parameters

Channel|HasBroadcastChannel|array|null $channels

Return Value

PendingBroadcast|null

in BroadcastsEvents at line 94
PendingBroadcast|null broadcastDeleted(Channel|HasBroadcastChannel|array|null $channels = null)

Broadcast that the model was deleted.

Parameters

Channel|HasBroadcastChannel|array|null $channels

Return Value

PendingBroadcast|null

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.

Parameters

BroadcastableModelEventOccurred $instance
string $event
Channel|HasBroadcastChannel|array|null $channels

Return Value

PendingBroadcast|null

in BroadcastsEvents at line 125
BroadcastableModelEventOccurred newBroadcastableModelEvent(string $event)

Create a new broadcastable model event event.

Parameters

string $event

Return Value

BroadcastableModelEventOccurred

in BroadcastsEvents at line 145
protected BroadcastableModelEventOccurred newBroadcastableEvent(string $event)

Create a new broadcastable model event for the model.

Parameters

string $event

Return Value

BroadcastableModelEventOccurred

in BroadcastsEvents at line 153
Channel|array broadcastOn(string $event)

Get the channels that model events should broadcast on.

Parameters

string $event

Return Value

Channel|array

in BroadcastsEvents at line 161
string|null broadcastConnection()

Get the queue connection that should be used to broadcast model events.

Return Value

string|null

in BroadcastsEvents at line 169
string|null broadcastQueue()

Get the queue that should be used to broadcast model events.

Return Value

string|null

at line 14
bool broadcastAfterCommit()

Determine if the model event broadcast queued job should be dispatched after all transactions are committed.

Return Value

bool