vyconsulting-group/push-notification

PHP wrapper FCM


Keywords
notifications, android, ios, FCM, messenging
License
CNRI-Python-GPL-Compatible

Documentation

push-notification

FCM push notification with PHP

INSTALLATION

 composer require vyconsulting-group/push-notification

-For one device :

<?php
require 'vendor/autoload.php';
$firebase = new \VyconsultingGroup\PushNotification('API_KEY');
$firebase->setMessage('test','Hello wolrd',1,1);
$firebase->setField('User_Token');
$firebase->execute();

-For multiple device:

<?php
require 'vendor/autoload.php';
$firebase = new \VyconsultingGroup\PushNotification('API_KEY');
$firebase->setMessage('test','Hello wolrd',1,1);
$firebase->setFields('Users_Token');//Users_tokens should be an array
$firebase->execute();