承接 redjanym/php-firebase-cloud-messaging 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

redjanym/php-firebase-cloud-messaging

最新稳定版本:v2.0.2

Composer 安装命令:

composer require redjanym/php-firebase-cloud-messaging

包简介

PHP SDK for Firebase Cloud Messaging from Google

README 文档

README

Buy Me a Coffee at ko-fi.com

PHP SDK for Firebase Cloud Messaging from Google, supporting HTTP V1.

See original Firebase docs: https://firebase.google.com/docs/

#Setup Install via Composer:

composer require redjanym/php-firebase-cloud-messaging

Or add this to your composer.json and run "composer update":

"require": {
    "redjanym/php-firebase-cloud-messaging": "2.*"
}

Send message to a Device

use RedjanYm\FCM\Client;
use RedjanYm\FCM\Notification;
use RedjanYm\FCM\Recipient\Device;

$serviceAccountPath = '/path/to/service-account.json';
$testToken = 'this-is-a-token';

$client = new Client($serviceAccountPath);
$recipient = new Device($testToken);
$notification = new Notification($recipient, 'Title', 'Body', ['key' => 'value']);

$client->send($notification);

Topic Support

The current version does not have support for Topics. We are going to add it on v2.1.

Migrating from V1.

Unfortunately V2 of this package introduces breaking changes. But the new structure of the SDK is still simple and very similar to the previous one. We are sure the migration is going to be very fast and easy.

Interpreting responses

Responses given on the HTTP requests are standard according to the FCM documentations. You may find detailed specifications in this links:

统计信息

  • 总下载量: 834.29k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 39
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 37
  • Watchers: 3
  • Forks: 120
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 未知

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固