hatasever/onesignal
最新稳定版本:1.0.5
Composer 安装命令:
composer require hatasever/onesignal
包简介
Onesignal push Notification api
README 文档
README
It allows you to send notifications via laravel using Onesignal push notification service.
Installation
Install the dependencies and devDependencies.
"```sh composer require hatasever/onesignal
Add these 3 parameters to the .env file
```sh
ONESIGNAL_APP_ID= Onesignal App id
ONESIGNAL_REST_API_KEY= Onesignal Api Key
USER_AUTH_KEY= OneSignal Auth Key
Add it to the service provider array in the config/app.php file
'providers' => [ . . * Package Service Providers... Hatasever\OneSignal\OneSignalServiceProvider::class, ], 'aliases' => [ . . . 'OneSignal' => Hatasever\OneSignal\OneSignalServiceProvider::class, ]
Send Notifications
use OneSignal; $params = []; $params['include_external_user_ids'] = [$userId]; /* Mobile app icon */ $params['small_icon'] = 'mdpi'; $params['large_icon'] = 'xxxhdpi'; $contents = [ "en" =>'Hello World!', "tr" => 'Merhaba Dünya!', ]; $params['contents'] = $contents; OneSignal::sendNotificationCustom($params);
统计信息
- 总下载量: 55
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-07-17