asundust / push-laravel
asundust/wechat-work-push的Laravel客户端
1.0.3
2024-03-13 05:28 UTC
Requires
- guzzlehttp/guzzle: ^6.3.1|^7.0.1
- illuminate/support: >=6
This package is auto-updated.
Last update: 2024-12-13 07:34:21 UTC
README
本项目为客户端,服务端请查看 Laravel-Admin服务端版 Dcat-Admin服务端版
安装
安装
composer require asundust/push-laravel
发布配置文件
php artisan vendor:publish --provider="Asundust\PushLaravel\PushLaravelServiceProvider"
- 配置文件在
config/push-laravel.php
文件里
配置
可以配置多组配置
PUSH_URL=
PUSH_SECRET=
使用
// use Asundust\PushLaravel\Facades\PushLaravel;
$title = '我是测试标题';
$content = '我是测试内容';
$url = 'https://www.baidu.com/';
$urlTitle = '我是链接';
// 其中 $content $url $urlTitle 可不传
// 默认配置
app('push-laravel')->send($title, $content, $url, $urlTitle);
// 指定配置
app('push-laravel.xxxxxx')->send($title, $content, $url, $urlTitle);
// 默认配置
PushLaravel::send($title, $content, $url, $urlTitle);
// 指定配置
PushLaravel::config('xxxxxx')->send($title, $content, $url, $urlTitle);
支持
如果觉得这个项目帮你节约了时间,不妨支持一下呗!