kuvardin / firebase-http-api-fcm
PHP SDK for HTTP Firebase Cloud Messaging Protocol
Installs: 9
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/kuvardin/firebase-http-api-fcm
Requires
- ext-json: *
- guzzlehttp/guzzle: ^7.0
This package is auto-updated.
Last update: 2025-10-16 23:31:42 UTC
README
Usage example
<?php require 'vendor/autoload.php'; $server_key = 'AAA123456...'; $device_token = 'AAABBBCCC123123...'; $client = new GuzzleHttp\Client(); $api = new Kuvardin\FirebaseHttpApiFcm\Api($client, $server_key); $target = Kuvardin\FirebaseHttpApiFcm\Target::createWithToken($device_token); $notification = new Kuvardin\FirebaseHttpApiFcm\Notification( 'Amazing notification', // title 'This is my app notification', // body 'FLUTTER_NOTIFICATION_CLICK' // click action ); $response = $api->sendNotification($target, $notification, [ 'key' => 'value', // custom data for app ]); print_r($response);