承接 preneesh/yii2-firebase-notifications 相关项目开发

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

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

preneesh/yii2-firebase-notifications

Composer 安装命令:

composer require preneesh/yii2-firebase-notifications

包简介

Sending Firebase Notification from Yii2 Application

README 文档

README

Send firebase notification from Yii2 application

==

Send firebase notification from Yii2 application This extension enables to send firebase notification to single user to give user specific updates.

Installation

The preferred way to install this extension is through composer.

Either run

php composer.phar require --prefer-dist preneesh/yii2-firebase-notifications "dev-master"

or add

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

to the require section of your composer.json file.

Usage

Once the extension is installed, simply use it in your code :

Firebase cloud messageing Server key is required to use the extension, which can be obtained from Firebase console -> Project Overview -> Settings -> Cloud Messaging

use preneesh\FirebaseNotifications\Notification;

$service = new Notification('YOUR_KEY');

$message = array();
$message['title']= "New Offer";
$message['body']= "New Year offer for the all products";

#unique token to be captured from android app and stored against user for sending notification to specific user
$tokens = "d-Uh6MC1eTk:APA91bHjvSR3BDjfBqt4-ZkPbu69aije4HCzcKqvIpcBJof8Zc7z8jVeVb1WLGEjfgd6POBfW-qGUcSsESiOAOKbFnOHt_m1rk-deElMgIsojS7gpF7trgYmsLjrxICsZg7LRgPXyn6b-eqCk9nE";

$service->send($tokens,$message);

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2020-05-11