Repository navigation
OneSignalNotification
Viames Marino edited this page Feb 23, 2026
·
1 revision
Pair\Services\OneSignalNotification sends push notifications through OneSignal APIs.
Use this service for targeted or segmented push delivery from Pair backend processes.
send(array $userUuids, string|array $title, string|array $message, array $data = [], array $options = []): ?stdClasssendToUser(User $user, ...): ?stdClasssendToUsers(Collection|array $users, ...): ?stdClasssendToSegment(string $segment, ...): ?stdClasscancel(string $notificationId): bool
$result = \Pair\Services\OneSignalNotification::send(
['u_42', 'u_73'],
['en' => 'Shipment update'],
['en' => 'Your order is on the way'],
['orderId' => 2241],
['url' => '/orders/2241']
);\Pair\Services\OneSignalNotification::sendToSegment(
'Active Users',
'Promo',
'Weekend offer is now live',
['campaign' => 'wknd-2026']
);- Missing
ONE_SIGNAL_APP_IDorONE_SIGNAL_REST_API_KEYcauses silent operational failures. - Avoid oversized payloads in
data.
See also: PushDispatcher, Notification, PWA.
Home · Setup · Configuration
Build with Pair 4
- Generator
- Controllers and responses
- Read models
- ActiveRecord and queries
- Forms and validation
- PairUI.js and HTML fragments
APIs and authentication
- API guide and CRUD
- Middleware and rate limits
- Users, sessions, and ACL
- Passkeys and social login
- Native mobile setup
Integrate and operate
- Integrations
- Runtime extensions and adapter keys
- Cache and cache stores
- Logs and observability
- PWA and push
- Packages and distribution
- Upgrade to v4