dizda/onesignal-api-bundle
最新稳定版本:0.1.5
Composer 安装命令:
composer require dizda/onesignal-api-bundle
包简介
OneSignal API Bundle for Symfony.
README 文档
README
OnesignalApiBundle
Integrate OneSignal API in Symfony with ease.
Use the PHP library made by Norkunas.
Setup
Install with Composer
composer require dizda/onesignal-api-bundle
Add bundle to app/AppKernel.php
public function registerBundles()
{
$bundles = array(
....
new Dizda\OnesignalApiBundle\DizdaOnesignalApiBundle()
);
}
Configuration
Add this to your config.yml:
dizda_onesignal_api: app_id: %onesignal_app_id% app_auth_key: %onesignal_app_auth_key%
Use
Send a simple notification:
$client = $this->get('dizda_onesignal_api.service.client'); $client->notifications->add([ 'headings' => [ 'en' => 'Withdraw' ], 'contents' => [ 'en' => 'Your withdraw has been sent!' ], 'included_segments' => ['All'], 'url' => 'http://google.fr' ]);
License
MIT Licensed, see LICENSE.
统计信息
- 总下载量: 10.41k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 8
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-07-04