Property | Type | Description | |
---|---|---|---|
$dates | |||
$subjectModels | array | A map of notification types and the model classes to use for their subjects. For example, the 'discussionRenamed' notification type, which represents that a user's discussion was renamed, has the subject model class 'Flarum\Core\Discussion'. | |
$table |
Method | Description | |
---|---|---|
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 ( ) : |
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 ( ) : |
Define the relationship with the notification's recipient. |
public getDataAttribute ( string $value ) : mixed | ||
$value | string | |
return | mixed |
public getSubjectModelAttribute ( ) : string | null | ||
return | string | null |
public static getSubjectModels ( ) : array | ||
return | array |
public sender ( ) : |
||
return |
public setDataAttribute ( mixed $value ) | ||
$value | mixed |
public subject ( ) : Illuminate\Database\Eloquent\Relations\MorphTo | ||
return | Illuminate\Database\Eloquent\Relations\MorphTo |
public user ( ) : |
||
return |
protected static array $subjectModels | ||
return | array |