class
Illuminate
/
Notifications
/
DatabaseNotification
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.
DatabaseNotification
Extends
Properties
protected
$keyType string
The "type" of the primary key ID.
Default: 'string'
public
$incrementing bool
Indicates if the IDs are auto-incrementing.
Default: false
protected
$table string
The table associated with the model.
Default: 'notifications'
protected
$guarded array
The guarded attributes on the model.
Default: []
protected
$casts array
The attributes that should be cast to native types.
Default: array
Methods
public
markAsRead ( ) : void
Mark the notification as read.
public
markAsUnread ( ) : void
Mark the notification as unread.
public
read ( ) : bool
Determine if a notification has been read.
public
unread ( ) : bool
Determine if a notification has not been read.
public
scopeRead ( Builder $query ) : Builder
Scope a query to only include read notifications.
Parameters
- $query Builder
public
scopeUnread ( Builder $query ) : Builder
Scope a query to only include unread notifications.
Parameters
- $query Builder
public
newCollection ( array $models ) : DatabaseNotificationCollection
Create a new database notification collection instance.
Parameters
- $models array