DatabaseNotification
Last updated
Last updated
Marks the notification as read and updates the database.
Name | Type | Required | Default | Description |
---|---|---|---|---|
Return: This DatabaseNotification
instance.
Deletes the notification from the database.
Name | Type | Required | Default | Description |
---|---|---|---|---|
Return: This DatabaseNotification
instance.
Returns a serializable representation of this DatabaseNotification
.
Return: (struct
) The memento of this DatabaseNotification
instance.
Returns the Channel instance the notification belongs to.
This method also handles deserializing the data
property from JSON.
Return: This DatabaseNotification
instance.
Returns the Channel instance the notification belongs to.
Return: (BaseProvider
) The Channel instance.
Returns the id in the database of this notification.
Return: (string
) The DatabaseNotification
id.
Returns the Notification Type of the Notification. Populated in the database from calling Notification#getNotificationType
which defaults to the WireBox id of the notification.
Return: (string
) The Notification Type of the DatabaseNotification
.
Returns the stored Notifiable type of the Notification. Populated in the database from calling INotifiable#getNotifiableType
when storing the notification.
Return: (string
) The Notifiable type of the DatabaseNotification
.
Returns the stored Notifiable id of the Notification. Populated in the database from calling INotifiable#getNotifiableId
when storing the notification.
Return: (string
) The Notifiable id of the DatabaseNotification
.
Returns the data sent for the notification. Populated in the database from calling toDatabase
on the Notification instance when storing the notification.
Return: (struct
) The data of the DatabaseNotification
.
Returns the read date of the notification. Returns an empty string if the notification hasn't been read.
Return: (date
) The read date of the DatabaseNotification
.
Returns the created date of the notification.
Return: (date
) The created date of the DatabaseNotification
.
The setters of this component should be considered private
.
Sets the Channel instance the notification belongs to.
Return: This DatabaseNotification
instance.
Sets the id of the DatabaseNotification
.
Return: This DatabaseNotification
instance.
Sets the type of the DatabaseNotification
.
Return: This DatabaseNotification
instance.
Sets the Notifiable type of the DatabaseNotification
.
Return: This DatabaseNotification
instance.
Sets the Notifiable id of the DatabaseNotification
.
Return: This DatabaseNotification
instance.
Sets the data of the DatabaseNotification
.
Return: This DatabaseNotification
instance.
Sets the read date of the DatabaseNotification
.
Consider using the markAsRead
method instead of interacting with this setter directly as the markAsRead
method will also update the database.
Return: This DatabaseNotification
instance.
Sets the created date of the DatabaseNotification
.
Return: This DatabaseNotification
instance.
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
Name | Type | Required | Default | Description |
---|---|---|---|---|
readDate
date
false
now()
The date to use when marking the notification as read.
No arguments
No arguments
properties
struct
true
The properties to set for this DatabaseNotification
instance.
No arguments
No arguments
No arguments
No arguments
No arguments
No arguments
No arguments
No arguments
channel
BaseProvider
true
The Channel instance the notification belongs to.
id
string
true
The id of the DatabaseNotification
.
type
string
true
The type of the DatabaseNotification
.
notifiableType
string
true
The Notifiable type of the DatabaseNotification
.
notifiableId
string
true
The Notifiable id of the DatabaseNotification
.
data
struct
true
The data of the DatabaseNotification
.
readDate
date
true
The read date of the DatabaseNotification
.
createdDate
date
true
The created date of the DatabaseNotification
.