amdadulhaq/fcm-laravel
Send push notifications from Laravel via Firebase Cloud Messaging (FCM). A lightweight wrapper that lets you deliver notification and data messages to Android, iOS, and web clients through a simple, expressive API, with support for device tokens and topic-based delivery.
Package: amdad121/fcm-laravel — a Laravel wrapper for Firebase Cloud Messaging (push notifications), consumed via Composer and typically surfaced through a facade, a publishable config file, and a notification channel.
Architecture fit. The package follows Laravel's standard package conventions (service provider, facade, config publish, optional notification channel), so it slots into an existing Laravel app without architectural rework. The meaningful architectural decision is whether to depend on this thin wrapper versus the first-party kreait/laravel-firebase or calling the FCM HTTP v1 API directly. This package trades breadth for a smaller surface area, which is fine for teams that only need push and want to avoid the heavier Firebase SDK.
Integration feasibility. Low-to-moderate effort: composer require, vendor:publish the config, supply service-account credentials, wire the notification channel. The gating factor is not installation but the v1.3.0 → v2.0.0 major version boundary. Semver major signals breaking changes, and the supplied release notes are only a changelog URL with no enumerated changes. Feasibility is therefore unverified until the diff is read.
Technical risk.
UPGRADE.md referenced. Without one, the source diff becomes the upgrade guide.Key questions to resolve before adoption or upgrade.
composer.json for v2?toFcm() signature) survive the bump?Stack fit. Standard Laravel + Composer. Runtime prerequisites: an HTTP client (Guzzle), google/auth (or equivalent) for OAuth2 token minting if v2 moves to HTTP v1 exclusively, a queue driver for async dispatch, and a working queue worker in every environment that sends push. Config caching means credentials must be injected via env vars, not edited into config/fcm.php post-deploy.
Compatibility. Confirm the constraint matrix before committing: PHP version, Laravel version, and FCM API generation (legacy vs HTTP v1). If v2 is HTTP v1-only, the credential format changes from a server key string to a service-account JSON file — that is a configuration and secrets-management change, not just a code change.
Migration path.
v1.3.0...v2.0.0 compare diff and any migration notes in the README — treat this as the upgrade guide.Sequencing. Do not combine this upgrade with unrelated Laravel or PHP version bumps. If the app is currently on v1.3.0 and sending production traffic, pin to 1.3.* explicitly so an accidental composer update cannot pull v2, then schedule the upgrade deliberately.
Maintenance. Ongoing cost is dominated by the major-version jump: expect a one-time upgrade project plus periodic re-validation whenever FCM changes its API surface. Budget an internal owner — this is not a "set and forget" dependency.
Support. Community OSS with no vendor SLA. Issue response time is best-effort. For anything customer-facing, the internal team must be able to read the package source and patch it; a fork is a reasonable contingency.
Scaling. All sends must be queued — synchronous sends will couple push latency to API request latency and will fall over under a fan-out. Watch for: FCM per-project throughput quotas, per-device rate limits, and unbounded queue growth during retries. Batch where the API allows it, and use exponential backoff with jitter on 429/5xx.
Failure modes.
UNREGISTERED/INVALID_ARGUMENT; without a pruning job these accumulate and inflate error rates. Needs a token lifecycle table and cleanup.Ramp-up. Low for a Laravel developer on the package itself; moderate for FCM domain concepts (topics vs tokens vs conditions, notification vs data-only payloads, per-platform behavior). Allocate roughly half a day for a developer new to FCM, plus the upgrade spike.
Caveat on this assessment. It is provisional. The only release artifact supplied for v2.0.0 was a changelog URL containing no enumerated changes, so the breaking-change scope, version constraints, and feature set are inferred from the major version bump rather than confirmed. Re-score Technical Risk once the compare diff and README are reviewed.
How can I help you explore Laravel packages today?