Notification
extends Model
in package
RainLab\Notify\Models\Notification
Tags
Table of Contents
- $body : string|null
- $created_at : Carbon|null
- $data : string
- $event_type : string
- $icon : string|null
- $id : string
- $incrementing : bool
- Indicates if the IDs are auto-incrementing.
- $morphTo : array<string|int, mixed>
- $notifiable_id : int
- $notifiable_type : string
- $parsed_body : string
- $read_at : Carbon|null
- $table : string
- $type : string|null
- $updated_at : Carbon|null
- $appends : array<string|int, mixed>
- The accessors to append to the model's array form.
- $dates : array<string|int, mixed>
- $fillable : array<string|int, mixed>
- $guarded : array<string|int, mixed>
- $jsonable : array<string|int, mixed>
- all() :
- applyRead() :
- applyUnread() :
- get() :
- getParsedBodyAttribute() : string
- Get the parsed body of the announcement.
- markAsRead() : void
- Mark the notification as read.
- newModelQuery() :
- newQuery() :
- query() :
- read() : bool
- Determine if a notification has been read.
- scopeApplyRead() : mixed
- Get the entity's read notifications.
- scopeApplyUnread() : mixed
- Get the entity's unread notifications.
- unread() : bool
- Determine if a notification has not been read.
- whereBody() :
- whereCreatedAt() :
- whereData() :
- whereEventType() :
- whereIcon() :
- whereId() :
- whereNotifiableId() :
- whereNotifiableType() :
- whereReadAt() :
- whereType() :
- whereUpdatedAt() :
Properties
$body
public
string|null
$body
$created_at
public
Carbon|null
$created_at
$data
public
string
$data
$event_type
public
string
$event_type
$icon
public
string|null
$icon
$id
public
string
$id
$incrementing
Indicates if the IDs are auto-incrementing.
public
bool
$incrementing
= false
$morphTo
public
array<string|int, mixed>
$morphTo
= ['notifiable' => []]
Relations
$notifiable_id
public
int
$notifiable_id
$notifiable_type
public
string
$notifiable_type
$parsed_body read-only
public
string
$parsed_body
$read_at
public
Carbon|null
$read_at
$table
public
string
$table
= 'rainlab_notify_notifications'
The database table used by the model.
$type
public
string|null
$type
$updated_at
public
Carbon|null
$updated_at
$appends
The accessors to append to the model's array form.
protected
array<string|int, mixed>
$appends
= ['parsed_body']
$dates
protected
array<string|int, mixed>
$dates
= ['read_at']
List of datetime attributes to convert to an instance of Carbon/DateTime objects.
$fillable
protected
array<string|int, mixed>
$fillable
= []
Fillable fields
$guarded
protected
array<string|int, mixed>
$guarded
= []
Guarded fields
$jsonable
protected
array<string|int, mixed>
$jsonable
= ['data']
List of attribute names which are json encoded and decoded from the database.
Methods
all()
public
static all(mixed $columns) :
Parameters
- $columns : mixed
Return values
—applyRead()
public
static applyRead() :
Return values
—applyUnread()
public
static applyUnread() :
Return values
—get()
public
static get(mixed $columns) :
Parameters
- $columns : mixed
Return values
—getParsedBodyAttribute()
Get the parsed body of the announcement.
public
getParsedBodyAttribute() : string
Return values
string —markAsRead()
Mark the notification as read.
public
markAsRead() : void
Return values
void —newModelQuery()
public
static newModelQuery() :
Return values
—newQuery()
public
static newQuery() :
Return values
—query()
public
static query() :
Return values
—read()
Determine if a notification has been read.
public
read() : bool
Return values
bool —scopeApplyRead()
Get the entity's read notifications.
public
scopeApplyRead(mixed $query) : mixed
Parameters
- $query : mixed
Return values
mixed —scopeApplyUnread()
Get the entity's unread notifications.
public
scopeApplyUnread(mixed $query) : mixed
Parameters
- $query : mixed
Return values
mixed —unread()
Determine if a notification has not been read.
public
unread() : bool
Return values
bool —whereBody()
public
static whereBody(mixed $value) :
Parameters
- $value : mixed
Return values
—whereCreatedAt()
public
static whereCreatedAt(mixed $value) :
Parameters
- $value : mixed
Return values
—whereData()
public
static whereData(mixed $value) :
Parameters
- $value : mixed
Return values
—whereEventType()
public
static whereEventType(mixed $value) :
Parameters
- $value : mixed
Return values
—whereIcon()
public
static whereIcon(mixed $value) :
Parameters
- $value : mixed
Return values
—whereId()
public
static whereId(mixed $value) :
Parameters
- $value : mixed
Return values
—whereNotifiableId()
public
static whereNotifiableId(mixed $value) :
Parameters
- $value : mixed
Return values
—whereNotifiableType()
public
static whereNotifiableType(mixed $value) :
Parameters
- $value : mixed
Return values
—whereReadAt()
public
static whereReadAt(mixed $value) :
Parameters
- $value : mixed
Return values
—whereType()
public
static whereType(mixed $value) :
Parameters
- $value : mixed
Return values
—whereUpdatedAt()
public
static whereUpdatedAt(mixed $value) :
Parameters
- $value : mixed