-
Notifications
You must be signed in to change notification settings - Fork 2
PushSubscription
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Models\PushSubscription is the ActiveRecord model for push_subscriptions.
It stores endpoint and key material used by Web Push delivery.
-
userId(nullable for guests) endpointp256dhauthuserAgentrevokedAtlastSeenAtcreatedAtupdatedAt
Usually accessed through SubscriptionRepository:
$subs = (new \Pair\Push\SubscriptionRepository())->listByUser($userId);Or with ActiveRecord query helpers when needed.
- datetime and integer fields are auto-cast in
_init(). - Repository layer is preferred for business operations.
See also: SubscriptionRepository, Notification, PushDispatcher.