webelightdev / laravel-push-notification
使用 Laravel 的推送通知
1.0.1
2019-08-07 13:01 UTC
Requires
- php: ^7.0
This package is not auto-updated.
Last update: 2024-09-26 15:34:53 UTC
README
使用 Laravel 的推送通知
PushNotification::send(['deviceToken1', 'deviceToken2',..], 'Notification Message', 'Action Key');
- 参数1 [设备令牌] - 向单个/多个设备发送通知。
- 参数2 [通知消息] - 在移动设备通知托盘上显示的通知消息。
- 参数3 [操作键] - 操作键是在通知触摸时将用户重定向到移动应用中任何页面的辅助工具。
安装
要获取 Laravel 推送通知的最新版本,请使用 composer 运行以下命令:
composer require webelightdev/laravel-push-notification dev-master
或者,您可以手动更新 require 块并运行 composer update
"require": {
"webelightdev/laravel-push-notification": "dev-master"
}
一旦安装了 Laravel 推送通知,您需要在 config/app.php 中注册服务提供者,在 providers 列表中添加以下内容:
Webelightdev\LaravelPushNotification\PushNotificationServiceProvider::class,
需要运行 composer dump-autoload
要发布配置、迁移、服务提供者和外观
php artisan vendor:publish
最后,运行迁移以生成通知日志表
php artisan migrate
我们客户之一使用 laravel-push-notification 插件推送通知的最新快照
许可证
MIT 许可证(MIT)。有关更多信息,请参阅许可证文件。