PushSubscription - viames/pair GitHub Wiki
Pair framework: PushSubscription
Pair\Models\PushSubscription is the ActiveRecord model for push_subscriptions.
It stores endpoint and key material used by Web Push delivery.
Key fields
userId(nullable for guests)endpointp256dhauthuserAgentrevokedAtlastSeenAtcreatedAtupdatedAt
Typical usage
Usually accessed through SubscriptionRepository:
$subs = (new \Pair\Push\SubscriptionRepository())->listByUser($userId);
Or with ActiveRecord query helpers when needed.
Notes
- datetime and integer fields are auto-cast in
_init(). - Repository layer is preferred for business operations.
See also: SubscriptionRepository, Notification, PushDispatcher.