Laravel Mobile Push

Laravel Mobile Push: APNs, FCM and Live Activities for Laravel

tests
license: MIT

APNs, FCM and Live Activities for Laravel: send push notifications directly to Apple and Google over HTTP/2, and always know what happened to each one.
One call reaches a user’s iPhone through APNs and their Android phone through FCM HTTP v1, with no intermediate service, and returns one explicit result per device: accepted, rejected, deferred, or honestly unknown.

MobilePush::to($user)->send(PushMessage::make('Order shipped', 'Arrives Friday'));
Project status: pre-release

The package is complete enough to try, but it has never been run against the real APNs or FCM servers, nor on a real device, in this project. It is verified against a protocol-level HTTP/2 mock server and against the providers’ published schemas. Real-provider verification is the next step before 1.0. The list of what is not yet verified is in the README; if you try it against the real services, an issue with what you saw (even “it worked”) is the most useful contribution right now.

New here? Start with the walkthrough

Getting started takes an empty Laravel app to a push on your own phone, one step at a time. Then read Outcomes (what “accepted” and “unknown” really mean) and Safe mode (why nothing leaves your machine by accident). Credentials: APNs and FCM.


Why this package

Explicit outcomes, including unknown

Every device ends with one status. An unknown outcome is never reported as a failure, never triggers a fallback channel or a token invalidation. See Outcomes.

No silent duplicates from libcurl

libcurl re-sends by itself a request whose connection died; the package streams request bodies so such a re-send fails instead of pushing twice. See HTTP/2 transport.

Safe by default outside production

With the default auto mode only APP_ENV=production sends for real; elsewhere every send is simulated. See Safe mode.

Durable when you need it

An optional durable profile records every delivery in a ledger with an outbox and deduplicates by effect key. See Delivery profiles.

Live Activities, broadcast channels included

Start, update and end activities, and publish to iOS 18 broadcast channels. See Live Activities.

First-class testing fakes

MobilePush::fake() checks what your code asked to send; MobilePush::fakeTransport() runs the real pipeline and checks the exact bytes. See Testing.


Find your way


Requirements

  • PHP 8.3 or newer with ext-curl, ext-openssl, ext-json, and a libcurl built with HTTP/2 (7.68 or newer; php artisan mobile-push:doctor checks it).
  • Laravel 12 or 13.
  • A cache store shared by your workers and able to take locks (Redis, Memcached, database, DynamoDB) in production.

About these pages

Every page of this site except this one is generated from the Markdown files in the repository (README.md, docs/, benchmarks/), so the site and the repository documentation cannot disagree. The PHP examples are executed by the package’s test suite. Benchmark figures, where shown, were measured against a local mock server and say nothing about Apple or Google; see Benchmarks.

Source on GitHub · Changelog · Contributing · Security policy · MIT licence