Skip to content

NotificationSubscriber Model ​

Represents rows in fcom_notification_users where object_type = notification.

Table ​

  • Table: fcom_notification_users

  • Primary key: id

  • Extends: Model

Attributes ​

ColumnTypeNullableDefaultDescription
idBIGINT UNSIGNEDNo—Primary key for the row.
object_typeVARCHAR(50)Yes'notification'Discriminator used to reuse the same table for multiple object types.
notification_typeVARCHAR(50)Yes'web'Delivery channel or notification subtype for the row.
object_idBIGINT UNSIGNEDYes—Associated object ID, interpreted together with the object type.
user_idBIGINT UNSIGNEDYes—WordPress user ID associated with the row.
is_readTINYINT(1) UNSIGNEDYes0Boolean-like flag indicating whether the notification has been read.
created_atTIMESTAMPYes—Creation timestamp maintained by the ORM.
updated_atTIMESTAMPYes—Update timestamp maintained by the ORM.

Relationships ​

MethodTypeTargetNotes
user()belongsToUserSignature: —
xprofile()belongsToXProfileSignature: —
notification()belongsToNotificationSignature: —

Scopes ​

ScopeParametersPurpose
Unread$queryUnread scope declared on the model.
Read$queryRead scope declared on the model.

Key Methods ​

MethodDescription
—No additional public methods are documented for this model.

Usage Examples ​

php
use FluentCommunity\App\Models\NotificationSubscriber;

$records = NotificationSubscriber::query()
    ->unread()
    ->limit(10)
    ->get();

$first = NotificationSubscriber::query()->first();

FluentCommunity developer documentation