legomolina / fcm-push-notification
Basic class to send push notifications through Google Firebase
2.0.0
2018-12-18 20:30 UTC
Requires
- php: >=7.0
This package is not auto-updated.
Last update: 2025-04-12 22:52:54 UTC
README
Basic class to send push notifications using google firebase.
Installation
Be careful! This library needs curl module for php to work.
FMC Push Notifications is hosted in packagist so you can get it from Composer
composer require legomolina/fcm-push-notification
Usage
Require the Composer autoload in your index:
<?php require 'vendor/autoload.php';
Set your Firebase API key
FCMPushNotifications::API_KEY = "my_api_key";
Create a notification object:
$notification = new FCMNotification("Title", "Message");
And send notifications
FCMPushNotifications::send("mobile_token_or_topic", $notification, [ "custom" => "data" ]);
License
FMC Push Notifications is licensed under the GPL v3 license. See License File for more information.