Menu

## Message extends Model
in package

Message.php : 26

Class Message

Model for managing messages within conversations.

##### Tags

mixin

### Table of Contents

#### Properties

$body : string
$conversation : Conversation
$conversation_id : int
$created_at : DateTime
$id : int
$updated_at : DateTime
$user : User
$user_id : int
$fillable : mixed

#### Methods

conversation() : BelongsTo
  Get the conversation this message belongs to.
isOwn() : bool
  Check if the message was created by the authenticated user.
user() : BelongsTo
  Get the user who sent this message.

### Properties

#### $body

Message.php : 0
`public string $body`

#### $conversation read-only

Message.php : 0
`public Conversation $conversation`

#### $conversation_id

Message.php : 0
`public int $conversation_id`

#### $created_at

Message.php : 0
`public DateTime $created_at`

#### $id

Message.php : 0
`public int $id`

#### $updated_at

Message.php : 0
`public DateTime $updated_at`

#### $user read-only

Message.php : 0
`public User $user`

#### $user_id

Message.php : 0
`public int $user_id`

#### $fillable

Message.php : 28
`protected mixed $fillable = ['user_id', 'body']`

### Methods

#### conversation()

Message.php : 48

Get the conversation this message belongs to.

`public conversation() : BelongsTo`

##### Return values

BelongsTo

#### isOwn()

Message.php : 38

Check if the message was created by the authenticated user.

`public isOwn() : bool`

##### Return values

bool

#### user()

Message.php : 58

Get the user who sent this message.

`public user() : BelongsTo`

##### Return values

BelongsTo

## Search results