class Notification extends DatabaseNotification (View source)

Traits

QueriesExpressions

Properties

string $id
string $type
string $notifiable_type
int $notifiable_id
array $data
null|int $sender_id
null|string $group_type
null|int $group_id
null|string $content_type
null|int $content_id
null|Carbon $created_at
null|Carbon $updated_at
null|Carbon $read_at
null|Notification read-only $template
null|User read-only $sender
null|Model read-only $group
null|Model read-only $content

Methods

getConnectionName()

No description

BelongsTo
sender()

Relationship with the user whose action caused the notification to be sent.

MorphTo
group()

Relationship with the notification's group.

MorphTo
content()

Relationship with the notification's content.

void
scopeGroupedWith(Builder $query, Notification $notification)

Query notifications that have the same type and group as a notification.

resolveRouteBinding($value, $field = null)

Only allow users to view their own notifications.

Attribute
template()

No description

Attribute
url()

No description

Details

getConnectionName()

No description

BelongsTo sender()

Relationship with the user whose action caused the notification to be sent.

Return Value

BelongsTo

MorphTo group()

Relationship with the notification's group.

Return Value

MorphTo

MorphTo content()

Relationship with the notification's content.

Return Value

MorphTo

void scopeGroupedWith(Builder $query, Notification $notification)

Query notifications that have the same type and group as a notification.

Parameters

Builder $query
Notification $notification

Return Value

void

resolveRouteBinding($value, $field = null)

Only allow users to view their own notifications.

Parameters

$value
$field

protected Attribute template()

No description

Return Value

Attribute

protected Attribute url()

No description

Return Value

Attribute