Package Data | |
---|---|
Maintainer Username: | shaobaojie |
Maintainer Contact: | 26416@163.com (baojie.shao) |
Package Create Date: | 2016-04-01 |
Package Last Update: | 2016-06-07 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-04-18 03:03:59 |
Package Statistics | |
---|---|
Total Downloads: | 2,945 |
Monthly Downloads: | 3 |
Daily Downloads: | 0 |
Total Stars: | 6 |
Total Watchers: | 2 |
Total Forks: | 1 |
Total Open Issues: | 0 |
整合修改官方的示例,融合到Laravel 5.2 中。
1.composer 安装
composer require umeng/umeng dev-master
2.在app.php 中添加ServiceProvider、Facades
'Umeng\UMengServiceProvider',
aliases:
'Android' => 'Umeng\Facades\Android',
'IOS' => 'Umeng\Facades\IOS',
3.配置文件
php artisan vendor:publish
修改配置文件 config/Services/umeng.php 填上你自己的Key Secret
4.示例
$apns = [
'alert' => ['title'=>'biaoti','body'=>'fujingdexuanjianghu'],
'badge' => 1,
'sound' => 'bingbong.aiff'
];
return IOS::customizedcast('S100000567',$apns);
$body = [
'ticker'=>'收到请告诉我',
'title'=>'通知标题',
'text'=>'通知文字描述',
'after_open'=>'go_app'
];
return Android::customizedcast('S100000597', $body);