fgh151 / yii2-push
移动端(Android、iOS)推送通知扩展
0.0.1
2016-01-14 08:06 UTC
Requires
- ext-curl: *
- yiisoft/yii2: *
This package is auto-updated.
Last update: 2024-08-28 22:37:25 UTC
README
安装
安装此扩展的首选方式是通过Composer。
可以执行以下操作:
php composer.phar require --prefer-dist fgh151/yii2-push "*"
或者将其添加到您的composer.json
文件的require部分:
"fgh151/yii2-push": "*"
使用方法
扩展安装完成后,只需通过以下方式将其添加到您的配置中:
基本 config/web.php
高级 [backend|frontend|common]/config/main.php
'modules' => [
'push' => [
'class' => 'fgh151\modules\push\Module',
],
...
...
],
例如:$push = new Push(); $params = ["android", $idphone=>"android_smart_phone_id_here", $mst=>"Hello, an android user"]; $rtn = $push->sendMessage($params); //print_r($rtn);