umeng/umeng

umeng laravel sdk

1.1.1 2016-06-07 06:17 UTC

This package is not auto-updated.

Last update: 2023-01-24 17:07:37 UTC


README

整合修改官方的示例,融合到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);