aporat/laravel-push-notifications
A Laravel package for sending push notifications to mobile devices. It offers a simple API for composing and dispatching notifications, helping you add iOS and Android push delivery to your app without building the underlying integration yourself.
Push::app('name') with one config entry per app (APNs bundle_id/team_id/key_id/private_key, FCM service_account) maps directly to a product decision to ship more than one mobile app — white-label brands, regional variants, staging vs production bundles — without standing up new delivery infrastructure each time. If the roadmap has a second app anywhere in the next 12 months, this is the deciding shape.DeviceTokenUnregistered firing on APNs 410 / FCM UNREGISTERED means "user silently stopped receiving pushes" gets one cross-platform listener instead of per-provider cleanup. That is what makes a delivery-success-rate-per-app number trustworthy enough to put on a dashboard or in a roadmap review.via(), toPush(), routeNotificationForPush()), decisions about transactional vs marketing, per-user preferences, and which product events become pushes remain in application code — not baked into a vendor abstraction. Good for future preference-center or compliance work.Push::fake() (assertSent, assertSentTo, assertNotSent, assertSentCount, assertNothingSent) turns "user receives push" into an automatable acceptance criterion; php artisan push:test verifies credentials and a device token from the terminal, shortening release checklists.BadDeviceToken against the sandbox gateway legitimizes Xcode-build tokens instead of treating internal dogfooding/TestFlight as a hack — relevant if beta programs are on the roadmap.Consider it when:
Look elsewhere, or wait, when:
composer.json resolves the core from a sibling checkout via a path repository. That is a real blocker for a release-critical path: do not commit to this until aporat/push-notifications is published and a plain composer require works in a clean CI container. Treat the current release as evaluable, not shippable.laravel-notification-channels push channels: more mature, though less opinionated about multi-app config, shared connections, and cross-worker token caching — that difference is the actual buy decision.Executives. Push notifications are a solved problem; the integration work is not. This package removes the undifferentiated glue — per-app credential handling, connection and token reuse across queue workers, dead-token cleanup, test doubles, and a credential smoke-test command — so the team spends its budget on which notifications to send and to whom, not on signing JWTs. It also makes the multi-app/multi-brand path cheap: adding an app becomes a config entry, not a project. The caveat is maturity, and it is a real one: this is a 0.1.0 first release, it requires PHP 8.4 and Laravel 12/13 (narrow today), and it is not yet fully installable from Packagist. Recommendation: a timeboxed spike on one non-critical app, with a go/no-go once the core dependency is published — not a platform-wide commitment.
Engineering. It is a thin Laravel binding over aporat/push-notifications. The wins are ergonomic config (one array entry per app; secrets-manager-friendly values), process-lifetime clients that suit queue workers, a shared token cache via any Laravel cache store, a notification channel that groups targets by app and sends concurrently, typed events for sent/failed/unregistered, optional sandbox retry for dev-build tokens, and first-class fakes plus php artisan push:test. The costs are equally concrete: PHP 8.4+/Laravel 12–13 only, pre-1.0 API, and a core dependency not yet on Packagist (note the path-repository entry in the package's own composer.json). Mitigate cheaply: pin versions, wrap Push::app() behind a small internal interface, and keep the DeviceTokenUnregistered listener provider-agnostic so replacing transport later is a contained change rather than a migration.
How can I help you explore Laravel packages today?