메소드 |
설명 |
|
getDataAttribute ( string $value ) : mixed |
When getting the data attribute, unserialize the JSON stored in the
database into a plain array. |
|
getSubjectModelAttribute ( ) : string | null |
Get the subject model for this notification record by looking up its
type in our subject model map. |
|
getSubjectModels ( ) : array |
Get the type-to-subject-model map. |
|
read ( ) : void |
Mark a notification as read. |
|
sender ( ) : BelongsTo |
Define the relationship with the notification's sender. |
|
setDataAttribute ( mixed $value ) |
When setting the data attribute, serialize it into JSON for storage in
the database. |
|
setSubjectModel ( string $type, string $subjectModel ) : void |
Set the subject model for the given notification type. |
|
subject ( ) : Illuminate\Database\Eloquent\Relations\MorphTo |
Define the relationship with the notification's subject. |
|
user ( ) : BelongsTo |
Define the relationship with the notification's recipient. |
|