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.
composer require amdad121/fcm-laravel. Publish the config (php artisan vendor:publish --provider="Amdad121\Fcm\FcmServiceProvider" — confirm the provider namespace in the v2 README) and open config/fcm.php first.v1.3.0...v2.0.0 compare diff before wiring it into app code.PushNotifier) instead of calling the facade from controllers. Inject the service so tests can swap it and payload construction stays in one place.ShouldQueue notifications. FCM HTTP v1 calls are synchronous; queueing keeps request latency and FCM outages out of your web path.send method and map toFcm/toArray on the notifiable.user_id, token, platform, last_seen_at, revoked_at). Upsert on login/app open; delete or revoke on logout.message.token instead of to, notification/data placement, android/apns/webpush blocks). Do not upgrade production without a staging send.UNREGISTERED/INVALID_ARGUMENT as a reason to delete or quarantine the token; treat UNAVAILABLE/INTERNAL as retryable with backoff. Log the FCM error code, not just the human-readable message.UNREGISTERED.data.storage/logs/laravel.log plus the Firebase Console delivery reports. A failed send often returns a useful error code that the package may not surface by default.config/fcm.php; if the package exposes a custom HTTP client or payload builder, use it to add analytics labels and platform-specific blocks without forking.^2.0) and budget time to diff v1.3.0...v2.0.0 yourself before upgrading; the release notes alone are not enough to assess migration risk.How can I help you explore Laravel packages today?