class Illuminate / Database / Eloquent / BroadcastableModelEventOccurred
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

BroadcastableModelEventOccurred

Implements

Uses

Properties

public

$model Model

The model instance corresponding to the event.

Default: null
protected

$event string

The event name (created, updated, etc.).

Default: null
protected

$channels array

The channels that the event should be broadcast on.

Default: []
public

$connection string

The queue connection that should be used to queue the broadcast job.

Default: null
public

$queue string

The queue that should be used to queue the broadcast job.

Default: null
public

$afterCommit bool|null

Indicates whether the job should be dispatched after all database transactions have committed.

Default: null

Methods

public

__construct ( $model , $event ) : void

Create a new event instance.

Parameters

public

broadcastOn ( ) : array

The channels the event should broadcast on.

public

broadcastAs ( ) : string

The name the event should broadcast as.

public

broadcastWith ( ) : array|null

Get the data that should be sent with the broadcasted event.

public

onChannels ( array $channels ) : $this

Manually specify the channels the event should broadcast on.

Parameters

  • $channels array
public

shouldBroadcastNow ( ) : bool

Determine if the event should be broadcast synchronously.

public

event ( ) : string

Get the event name.