- What is williamcruzme/laravel-fcm used for?
- williamcruzme/laravel-fcm is a Laravel package for sending Firebase Cloud Messaging push notifications to one or many devices. It provides a simple facade and message-builder API for targeting device tokens, topics, and conditions with notification and data payloads. It is a transport wrapper, not a full notification platform, so audience segmentation, quiet hours, idempotency, and token lifecycle remain your responsibility.
- Does williamcruzme/laravel-fcm support Firebase Cloud Messaging HTTP v1?
- The package's design predates FCM's HTTP v1 migration, and config-driven FCM wrappers of that era typically use a static server key against the legacy fcm/send endpoint. Google retired the legacy FCM HTTP and XMPP APIs in June 2024 in favor of HTTP v1 with OAuth2 service-account bearer tokens. Verify the actual request implementation before adopting it; if it is legacy-only, it is not a valid transport for current FCM.
- How do I install and configure laravel-fcm in a Laravel app?
- Install with Composer, publish the package's config/fcm.php, and supply credentials according to its README. In a typical wrapper you inject a server key and call the facade from a job or service. Because the credential model may be legacy, confirm the required key type against current FCM requirements before wiring it into production.
- Which Laravel and PHP versions does laravel-fcm support?
- The package is a low-adoption project and is likely to lag current Laravel and PHP releases. Check its composer.json constraints for laravel/framework and PHP and confirm they intersect your target versions. If they do not, you would need a fork or a different package.
- Can laravel-fcm send push notifications to topics and conditions?
- Yes, the package exposes a message-builder API for sending to device tokens, topics, and conditional audiences. You can construct notification and data payloads for those targets through the facade. Review the builder methods for per-message platform overrides if you need Android or iOS-specific options.
- Does laravel-fcm work with Laravel's notification channels?
- It is architecturally a transport adapter with a service provider, facade, and contract rather than a Laravel notification framework. The assessment describes it as facade-only and does not indicate a native Notification channel. You can call it from a notification channel or job yourself, but you would own that integration.
- How does laravel-fcm handle partial failures and invalid device tokens?
- FCM returns per-token results rather than a single boolean, so partial failures must be parsed from the response. The evaluation flags this as a question gate for the package, so verify whether it exposes per-token success and error details. If not, wrap calls and inspect the raw response so invalid or unregistered tokens can be removed from your token store.
- Is williamcruzme/laravel-fcm safe for production use?
- It carries high technical risk for a customer-facing delivery path because of legacy FCM API concerns, low adoption, and single-maintainer bus factor. The assessment recommends a maintained transport or a thin in-house adapter behind a PushTransport interface. Do not adopt it without confirming HTTP v1 support, Laravel compatibility, and failure handling.
- What are the best alternatives to williamcruzme/laravel-fcm?
- Prefer maintained transports such as kreait/laravel-firebase or laravel-notification-channels/fcm, both of which track FCM HTTP v1 and fit Laravel's Notification channel. If you need a custom seam, build a thin in-house adapter behind a PushTransport interface and call HTTP v1 directly. These options cost more upfront than this package but avoid an unmaintained dependency in the delivery path.
- Is williamcruzme/laravel-fcm actively maintained?
- The project has roughly 64 stars and a score near 1.0, which points to a single-maintainer, low-adoption package with little community backpressure. Check the maintainer's commit and issue response history over the last 18 months before relying on it. In practice, adopting it means you would likely become the maintainer for fixes and Laravel upgrades.