- Does apility/laravel-fcm support the FCM HTTP v1 API, or only the legacy server key API?
- Based on the package's 2022 release and its surface area (server key config, token arrays, and /fcm/send-style calls), it targets Google's legacy FCM HTTP API. That API was deprecated in 2023 and shut down in mid-2024, so a legacy-only package will not deliver pushes today. Verify the API version against the source before planning anything and do not rely on README wording.
- Which PHP and Laravel versions does apility/laravel-fcm support?
- The last release, from October 2022, sits in the PHP 7.4 to 8.1 and Laravel 8/9 window. On Laravel 10/11 and PHP 8.2+ you should expect Composer resolution failures, and --ignore-platform-reqs only trades install friction for runtime deprecations. Treat a failed composer require as the default outcome on modern stacks. Lumen is supported through manual bootstrap/app.php registration.
- Is apility/laravel-fcm still maintained and safe for production?
- The repository is archived and unmaintained, so there are no security advisories, no Guzzle/PSR-7 CVE fixes, and no PHP minor-version patches. Combined with its legacy FCM API target, it is functionally dead for new work. Use it only to sustain an existing Laravel 9 or older install while you plan a migration.
- How do I install and configure apility/laravel-fcm?
- Install with Composer using composer require apility/laravel-fcm, then register the service provider and Fcm facade if you are not relying on package discovery. Publish the config file and set your FCM credential, typically the legacy server key, in that config or an environment variable. The transport is a singleton exposing sendTo(tokens, options, payload), and queues, token storage, and Notification channels are left to your application.
- How do I send a push notification to one device or many device tokens with apility/laravel-fcm?
- Call the Fcm transport's sendTo method with an array of device registration tokens, your options, and the payload. Legacy multicast accepts up to 1000 tokens per request and returns HTTP 200 even when individual tokens fail, so inspect per-token results in the response body. Never rely on the status code alone to confirm delivery.
- Can apility/laravel-fcm send to FCM topics and conditions?
- Yes, topic targeting is part of the legacy payload model the package exposes. However, topic and condition syntax differs between the legacy and HTTP v1 APIs, so every topic call site will need rewriting during a migration. Grep for topic and condition usage before estimating the work.
- Why does apility/laravel-fcm report success but no push notifications are delivered?
- That is the classic legacy FCM failure mode: the endpoint returns HTTP 200 with per-token errors embedded in the response body. Code that only checks the status code logs success while delivering nothing, and after the mid-2024 shutdown nothing is delivered at all. Log the full response body and per-token error codes, then confirm which API generation your pinned release actually speaks.
- What are the best alternatives to apility/laravel-fcm for Laravel?
- For HTTP v1 with OAuth2 service accounts, kreait/laravel-firebase and laravel-notification-channels/fcm are the usual picks, and both offer first-class Notification channel support. A fallback is a roughly 150-line internal client posting to the messages:send endpoint with a cached bearer token, which is often cheaper than adopting a heavier SDK. Either way, introduce a PushSender contract first so the implementation stays swappable.
- Can I use apility/laravel-fcm with Laravel 10, 11, or 12?
- Not cleanly. The dependency constraints resolve around Laravel 8/9 and PHP 7.4 to 8.1, so Composer will usually refuse to install on newer versions. Forcing it with --ignore-platform-reqs leaves you with deprecations and an unsupported legacy FCM transport, and a successful install still does not restore the shut-down API.
- How do I migrate away from apility/laravel-fcm with minimal code changes?
- Wrap the package behind your own small interface, for example a PushSender with send and sendToTokens methods, then swap the implementation behind it. Audit call sites for container lookups such as app('fcm') first, because those cannot be replaced without touching every caller. When moving to HTTP v1, convert data values to strings, restructure the notification, android, and apns blocks, and rewrite topic condition syntax.