asundust/push-laravel

asundust/wechat-work-push的Laravel客户端

1.0.3 2024-03-13 05:28 UTC

This package is auto-updated.

Last update: 2024-12-13 07:34:21 UTC


README

本项目为客户端,服务端请查看 Laravel-Admin服务端版 Dcat-Admin服务端版

StyleCI build status Total Downloads Latest Stable Version

安装

安装

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);

支持

如果觉得这个项目帮你节约了时间,不妨支持一下呗!

alipay wechat

License

The MIT License (MIT)