nasrul21/php-fcm-client

Firebase Cloud Messaging (FCM) client for PHP

Maintainers

Package info

github.com/nasrul21/php-fcm-client

pkg:composer/nasrul21/php-fcm-client

Statistics

Installs: 624

Dependents: 0

Suggesters: 0

Stars: 1

Open Issues: 0

v0.1.1 2020-12-02 21:06 UTC

This package is auto-updated.

Last update: 2026-03-01 00:49:15 UTC


README

A Simple PHP Library for sending FCM (Firebase Cloud Messages)

Requirement

  • PHP >= 7.0
  • Composer 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);

License

MIT