\App\EventsMessageSent

MessageSent event that can be broadcast to the frontend

Summary

Methods
Properties
Constants
__construct()
isFirst()
getMessage()
broadcastOn()
broadcastWith()
No public properties found
No constants found
getConversationChannel()
$message
$identifier
$first
N/A
No private methods found
No private properties found
N/A

Properties

$identifier

$identifier : string

Type

string

$first

$first : boolean

Whether this message is the first in a while sent in the conversation by this user.

Type

boolean

Methods

__construct()

__construct(\App\Message  $message, boolean  $first) 

Create a new event instance.

Parameters

\App\Message $message
boolean $first

isFirst()

isFirst() : boolean

Get whether this message is the first in a while sent in the conversation by this user.

Returns

boolean

getMessage()

getMessage() : \App\Message

Returns

\App\Message

broadcastOn()

broadcastOn() : \Illuminate\Broadcasting\Channel|array

Get the channels the event should broadcast on.

Returns

\Illuminate\Broadcasting\Channel|array

broadcastWith()

broadcastWith() : array

Get the data to broadcast.

Returns

array

getConversationChannel()

getConversationChannel(string  $username1, string  $username2) : \Illuminate\Broadcasting\PrivateChannel

Get the name of a conversation channel between two users.

Parameters

string $username1
string $username2

Returns

\Illuminate\Broadcasting\PrivateChannel