journalctl/push-to-pushe

此软件包已被弃用且不再维护。没有建议替代软件包。

向 pushe 用户发送推送通知

v0.17 2019-05-11 09:55 UTC

This package is auto-updated.

Last update: 2022-12-30 14:29:23 UTC


README

通过 pushe 服务在 laravel 中发送简单的推送通知。

安装

此软件包可以通过 Composer 安装。

composer require journalctl/push-to-pushe
php artisan vendor:publish

配置

将您的 pushe tokenapp_ids 添加到 config/push-to-pushe.php

[
    'app_ids' => ['appId-1'],
    'token' => 'your-pushe-service-token',
]

使用

将 HasPushToPushe 特性添加到您的 [用户] 模型中。

use Journalctl\HasPushToPushe;

...

use HasPushToPushe;

..

保存 pushe ids

use Journalctl\PushToPushe\PushToPushe;

...

$user->pusheIds()->save(new PushToPushe(['pushe_id' => 'your-client-pushe-id']));

...

发送推送通知

$user->pushToPushe('First notify', 'The first push to pushe notification!');

贡献

感谢您考虑为 PushToPushe 贡献!

许可证

PushToPushe 是开源软件,遵循 MIT 许可