absystem/gfcm
Composer 安装命令:
composer require absystem/gfcm
包简介
PHP Google Cloud Messaging (GCM) Library
README 文档
README
Google Firebase Cloud Messaging with PHP
INSTALLATION 🔥
composer require absystem/gfcm
REQUIREMENTS ⚠️
▪️ PHP >=5.6.
▪️ Composer.
▪️ Guzzle v6.x sudah include di package.
SETTING CONFIG 🌐
$config = [ 'server_key' => '', // kunci server dari google console 'base_url' => 'https://fcm.googleapis.com/fcm/send' ]; //array token device $tokendevice = [];
CONTOH PENGGUNAAN 💻
require_once __DIR__ . '/vendor/autoload.php'; use ABSystem\Google\FCM; $fcm = new FCM($config); $fcm->setTokenDevice($tokendevice); $fcm->setDataPayload([ 'koordinat' => [ 'lat' => '', 'lng' => '', ], 'link' => [ 'page'=> '/map.html' ], ]); $fcm->setPesan('Judul Notifikasi', 'Isi pesan yang tampil.'); $fcm->kirim();
统计信息
- 总下载量: 9
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2020-11-07