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 0.3.0.2
- 0.3.0.1
- 0.3
- 0.2.7.3
- 0.2.7.2
- 0.2.7.1
- 0.2.7
- 0.2.6
- 0.2.5.1
- 0.2.5
- 0.2.4
- 0.2.3
- 0.2.2
- 0.2.1
- 0.2
- 0.1.0.4
- 0.1.0.3
- 0.1.0.2
- 0.1.0.1
- 0.1
This package is not auto-updated.
Last update: 2024-09-14 19:36:47 UTC
README
第1步:安装 LBPushCenter
composer require libressltd/lbpushcenter
第2步:将服务提供者添加到 config/app.php 配置文件
LIBRESSLtd\LBPushCenter\LBPushCenterServiceProvider::class,
并别名
'LBPushCenter' => LIBRESSLtd\LBPushCenter\Controllers\LBPushCenter::class,
第3步:发布供应商
php artisan vendor:publish --tag=lbpushcenter --force
第4步:在主目录中使用
// Add a new device Push_device::add($token, $app_name); // Send message $device = Push_device::findOrFail($device_id); // not device token $device->send($title, $desc); // sync push $device->send_in_queue($title, $desc) // must run in queue
服务
// register device badge POST: <host>/lbpushcenter/api/device params: token, application // remove badge POST: <host>/lbpushcenter/api/device/<device_id>/clear_badge // disable / enable push PUT: <host>/lbpushcenter/api/device/<device_id> params: enabled = 0 / 1
运行推送的命令
// Add in app\Console\Kernel.php protected $commands = [ Commands\LBPushCommand::class ]; // Then run // Mode all php artisan lbpushcenter:push // --mode=all (allias) // Mode master php artisan lbpushcenter:push --mode=master // Mode worker php artisan lbpushcenter:push --mode=worker // Note // Run mode all for normal system (optional) // Run master first // Then run worker (run as many as you want)
迁移
删除并重新迁移设备表;
使用链接:(应由 lbsidemenu 添加)
管理应用(例如:ios-dev、ios-production、ios 等):/lbpushcenter/application
管理应用类型(ios / fcm,需要手动添加):/lbpushcenter/application_type
管理所有设备:/lbpushcenter/device
管理所有通知:/lbpushcenter/notification