inquid / yii2-firebase-notifications

此扩展将使您在 Yii2 框架中发送 Firebase 通知变得简单易行

安装次数: 23

依赖者: 0

建议者: 0

安全: 0

星级: 0

关注者: 1

分支: 14

类型:yii2-extension

dev-master 2021-05-27 04:51 UTC

This package is auto-updated.

Last update: 2024-09-27 12:01:38 UTC


README

此扩展将使您在 Yii2 框架中发送 Firebase 通知变得简单易行。

入门指南

以下说明将帮助您在本地计算机上创建并运行项目副本,以用于开发和测试。有关如何在实时系统上部署项目的说明,请参阅部署部分。

安装

安装此扩展的首选方法是使用 composer

运行以下命令之一:

composer require inquid/yii2-firebase-notifications

"inquid/yii2-firebase-notifications": "dev-master"

将以下内容添加到您的 composer.json 文件中的 require 部分。

用法

$service = new FirebaseNotifications(['authKey' => 'YOUR_KEY']);

$service->sendNotification(['to' => 'MyTopic','title'=>'New Alert', 'body' => 'New Sent Alert']);

您可以从这里克隆 Android 构建版本,并使用它来测试您的代码。