trait
Illuminate
/
Database
/
Eloquent
/
BroadcastsEvents
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
BroadcastsEvents
Methods
public
static
bootBroadcastsEvents ( ) : void
Boot the event broadcasting trait.
public
broadcastCreated ( $channels ) : PendingBroadcast
Broadcast that the model was created.
Parameters
- $channels Channel |HasBroadcastChannel |array|null
public
broadcastUpdated ( $channels ) : PendingBroadcast
Broadcast that the model was updated.
Parameters
- $channels Channel |HasBroadcastChannel |array|null
public
broadcastTrashed ( $channels ) : PendingBroadcast
Broadcast that the model was trashed.
Parameters
- $channels Channel |HasBroadcastChannel |array|null
public
broadcastRestored ( $channels ) : PendingBroadcast
Broadcast that the model was restored.
Parameters
- $channels Channel |HasBroadcastChannel |array|null
public
broadcastDeleted ( $channels ) : PendingBroadcast
Broadcast that the model was deleted.
Parameters
- $channels Channel |HasBroadcastChannel |array|null
protected
broadcastIfBroadcastChannelsExistForEvent ( $instance , $event , $channels ) : PendingBroadcast |null
Broadcast the given event instance if channels are configured for the model event.
Parameters
- $instance mixed
- $event string
- $channels mixed
public
newBroadcastableModelEvent ( $event ) : mixed
Create a new broadcastable model event event.
Parameters
- $event string
protected
newBroadcastableEvent ( string $event ) : BroadcastableModelEventOccurred
Create a new broadcastable model event for the model.
Parameters
- $event string
public
broadcastOn ( $event ) : Channel |array
Get the channels that model events should broadcast on.
Parameters
- $event string
public
broadcastConnection ( ) : string|null
Get the queue connection that should be used to broadcast model events.
public
broadcastQueue ( ) : string|null
Get the queue that should be used to broadcast model events.
public
broadcastAfterCommit ( ) : bool
Determine if the model event broadcast queued job should be dispatched after all transactions are committed.