Notification
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.
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.
protected Attribute
template()
No description
protected Attribute
url()
No description