douyuxingchen / php-alarm
飞书告警SDK
dev-main
2024-01-23 03:27 UTC
Requires
- php: ^7.2.5|^8.0
Requires (Dev)
- laravel/framework: ^6.0
- phpunit/phpunit: ^8.0
This package is auto-updated.
Last update: 2025-05-23 06:41:14 UTC
README
欢迎使用飞书的php报警服务库,本库旨在为公司的项目提供一个方便、高效且易于使用的工具。
安装
composer require "douyuxingchen/php-alarm"
更新
composer update "douyuxingchen/php-alarm" --ignore-platform-reqs
使用指南
默认机器人群组
$content = [ "环境: 123213", "标题: 商品合规检测通知-123123", "错误信息: 梳理考点福利卡上的", "渠道: 渠道名字", "店铺: 店铺", ]; $content = implode("\n", $content); (new FeiShuAlarm())->defaultPushMessageAlarm('Test title', $content);
指定机器人群组发送
https://open.feishu.cn/open-apis/bot/v2/hook/cxsdffsdf06e-46b3-4402-aafd5-ce6e30125092 $groupId = 'cxsdffsdf06e-46b3-4402-aafd5-ce6e30125092'; (new FeiShuAlarm())->groupIdPushMessageAlarm($groupId,'标题', $content);
使用指南
请参阅我们的完整文档。