Skip to content

NotificationSubscription Model ​

Represents rows in fcom_notification_users where object_type = subscription.

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: —

Scopes ​

ScopeParametersPurpose
——No custom scopes are declared on this model.

Key Methods ​

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

Usage Examples ​

php
use FluentCommunity\App\Models\NotificationSubscription;

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

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

FluentCommunity developer documentation