bariew/yii2-pusher 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

bariew/yii2-pusher

最新稳定版本:0.1.1

Composer 安装命令:

composer require bariew/yii2-pusher

包简介

yii2 web push for pusher.com

README 文档

README

INSTALL

php composer.phar require bariew/yii2-pusher

USAGE

1.  Add a new component into yor config file:
'components' => [
    'webpusher' => [
        'class' => 'bariew\yii2Pusher\Component',
        'app_id' => '***', // get your credentials on pusher.com
        'key' => '***',
        'secret' => '***',
    ]
]
2.  Include a widget into your view file e.g. "main.php":
    <?= \bariew\yii2Pusher\Widget::widget(['events' => [
        'notification' => new \yii\web\JsExpression("function(data){console.log(data);}")
    ]]) ?>
3.  Now you can send a notification to any user or an array of users:
Yii::$app->webpusher->userPush("hello user", [Yii::$app->user->id]);

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2016-04-11