nasrul21 / php-fcm-client
Firebase Cloud Messaging (FCM) client for PHP
v0.1.1
2020-12-02 21:06 UTC
Requires
- php: >= 7.0
This package is auto-updated.
Last update: 2025-04-29 01:04:16 UTC
README
A Simple PHP Library for sending FCM (Firebase Cloud Messages)
Requirement
PHP
>= 7.0Composer
as package manager
Installation
composer require nasrul21/php-fcm-client
Quickstart
<?php // load composer require 'vendor/autoload.php'; // set api key $apiKey = "..." // your fcm api key // initialize FCMClient with apiKey as params $fcm = new FCMClient($apiKey); $registration_ids = ["...", "..."]; $title = "Hello!"; $body = "This is the body"; // send fcm notifications $fcm->send($registration_ids, $title, $body);