stonecutter/laravel-log-wechat

Laravel 日志通道微信

0.2.1 2018-11-21 09:02 UTC

This package is auto-updated.

Last update: 2024-09-21 21:49:56 UTC


README

服务器错误日志发送到多人微信。

支持:Laravel 5.6、5.7

感谢:PushBear - 基于微信模板的一对多消息送达服务

使用步骤

登录 PushBear,创建消息通道,获取二维码(多人扫码收消息)和秘钥。

PushBear 消息通道管理

将秘钥放置于 Laravel 环境变量中,例如:

LOG_WECHAT_PUSHBEAR_SEND_KEY=6767-xxx

安装 package

composer require stonecutter/laravel-log-wechat
php artisan vendor:publish --tag=log-wechat-config --force

测试发送

php artisan wechat:hello

或在项目代码中使用

Log::error('你好,之华', ['city' => 'Shanghai', 'sender' => '尹川']);

效果:

微信收到消息