laravel-notification-channels/onesignal
OneSignal notification channel for Laravel. Send push notifications through OneSignal using Laravel’s notification system, with support for segments, filters, custom data, buttons, and platform-specific delivery options.
Architecture fit. Unchanged by 2.8.1. The package remains a thin Laravel notification-channel adapter over OneSignal's REST API. It fits cleanly if the application already uses Laravel's Notification facade and Notifiable models — you add onesignal as one more channel alongside mail/database/broadcast and implement toOneSignal($notifiable) plus routeNotificationForOneSignal(). Laravel keeps ownership of domain events and templating; OneSignal becomes the mobile push delivery layer. That separation is the right shape. The important caveat is that the package covers delivery only — device/subscription registration, permission prompts, and external-ID lifecycle live in the mobile client. That is routinely underestimated as "out of scope" and then becomes the critical path.
Integration feasibility. Low effort on the PHP side, and slightly lower than before if you are on a Laravel 13 track. composer require, publish config, add app_id + REST API key under config/services.php, implement the message and route methods, queue the notification. First end-to-end send is realistically 1–3 dev-days including credential setup and a test harness. Total feature timeline is dominated by the mobile release, not the backend work.
Technical risk.
include_player_ids, account-level REST key) to a v2 surface (app-scoped paths, external_id, subscription IDs). Released package versions differ in which they target. Pin the version, and confirm the pinned release uses the API shape OneSignal will still support at your horizon date.errors array. If the channel only checks status codes, sends appear successful while delivering nothing. 2.8.1 does not report a change here, so assume the earlier finding stands until you read the pinned source. Verify whether the version inspects the response body; if not, wrap it..env committed by habit.Key questions.
external_id targeting and OneSignal's current subscription model, or only legacy player IDs?errors-in-200 response shape to the caller?Stack fit. Laravel 10/11/12-era, PHP 8.1+, standard Guzzle-based HTTP — now with a documented Laravel 13 path as of 2.8.1. Confirm the Illuminate constraint bounds rather than inferring from the changelog headline; patch releases under the same minor sometimes widen bounds while leaving PHP or Guzzle untouched. It composes with queued notifications (ShouldQueue) for free, which is the correct default for push. If the team is already notification-centric, this is near-zero architectural friction; if push would be the first use of the notification system, you are adopting two things at once — scope accordingly.
Migration path. Greenfield push → adopt directly. Replacing direct FCM/APNs or another channel → run in parallel behind a per-notification-type feature flag: dual-send, compare delivery and open rates, then cut over, keeping the legacy path for one release cycle. Do not attempt a single-step cutover on business-critical notifications.
Compatibility. 2.8.1 is additive compatibility — the low-risk shape of change (no breaking changes, no deprecations announced, no API surface movement). Two consequences: (a) if you are planning a Laravel 13 upgrade, this package is no longer a blocker, so remove it from that risk register; (b) a patch bump means you should still re-run your send-path smoke test after upgrading, because a widened framework constraint can pull a different Illuminate resolution into your lockfile. Version-lock the package and record the OneSignal API version it speaks in your dependency register — that is the thing that will break, not PHP compatibility.
Sequencing. Unchanged.
login(appUserId) on authentication, logout() on sign-out. This is the real critical path and requires a mobile release plus store review.The PHP integration is step 2. Steps 3 and 4 are where the schedule lives.
Maintenance. Small code surface, three failure points you don't own: the package, OneSignal's API, and Apple/Google push infrastructure. 2.8.1 is a good data point — the project is being kept current with Laravel's release train, which lowers the odds of being stranded by a framework upgrade — but it does not address the OneSignal API drift risk, which remains the exposure that actually requires planning. Budget a quarterly dependency review and a named owner for the OneSignal account, credentials, and plan. OneSignal has changed pricing and feature gating over time; those changes can affect you with no code change on your side.
Support. MIT, community-supported, no vendor escalation. Your team must be able to read the channel source and patch it. Mitigate by wrapping usage in a single internal abstraction (one base notification class or a PushSender service) so a package swap touches one file rather than fifty.
Scaling. Fan-out is OneSignal's problem; your ceiling is queue throughput and OneSignal's rate limits. Keep sends off the request path, throttle or batch where limits apply, and model cost against subscriber/MAU growth on OneSignal's plan rather than against package usage.
Failure modes and detection.
Ramp-up. A Laravel-fluent engineer is productive on the channel in under a day. The learning curve is the external-ID contract between backend and mobile — write it down, share it across both teams, and keep a short runbook: how to rotate keys, how to send to one test device, and where to look first when delivery drops.
Verdict. 2.8.1 is a maintenance-only release: it removes Laravel 13 from the compatibility risk column and gives a modest positive signal on project liveness, with no breaking changes, no new features, and no change to the OneSignal API-drift exposure that drives the decision. Green-light where the team is already on Laravel notifications and push is a secondary channel. Yellow-light where push is business-critical and there is no in-house capacity to fork and patch a community package whose upstream API is actively changing.
How can I help you explore Laravel packages today?