PHPackages                             bing-leng-dt/laravel-exception-notify-xiavan - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Logging &amp; Monitoring](/categories/logging)
4. /
5. bing-leng-dt/laravel-exception-notify-xiavan

ActiveLibrary[Logging &amp; Monitoring](/categories/logging)

bing-leng-dt/laravel-exception-notify-xiavan
============================================

备注 此版本为学习为目的，不涉及任何第三方，如有侵权，请告知删除！

0393PHP

Since Dec 24Pushed 4y ago1 watchersCompare

[ Source](https://github.com/bingLengDT/laravel-exception-notify-xiavan)[ Packagist](https://packagist.org/packages/bing-leng-dt/laravel-exception-notify-xiavan)[ RSS](/packages/bing-leng-dt-laravel-exception-notify-xiavan/feed)WikiDiscussions main Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

laravel-exception-notify-xiavan
===============================

[](#laravel-exception-notify-xiavan)

[简体中文](README.md) | [ENGLISH](README-EN.md)

> Multiple channels of laravel exception notification(DingTalk、FeiShu、ServerChan、WeWork、XiZhi). - 多种通道的 laravel 异常通知。

[![Tests](https://github.com/guanguans/laravel-exception-notify/workflows/Tests/badge.svg)](https://github.com/guanguans/laravel-exception-notify/actions)[![Check & fix styling](https://github.com/guanguans/laravel-exception-notify/workflows/Check%20&%20fix%20styling/badge.svg)](https://github.com/guanguans/laravel-exception-notify/actions)[![codecov](https://camo.githubusercontent.com/0bb0183c2d095501bdebbf192bf46a1f9b946876136ab374f19bef8755675710/68747470733a2f2f636f6465636f762e696f2f67682f6775616e6775616e732f6c61726176656c2d657863657074696f6e2d6e6f746966792f6272616e63682f6d61696e2f67726170682f62616467652e7376673f746f6b656e3d55524746415753365334)](https://codecov.io/gh/guanguans/laravel-exception-notify)[![Latest Stable Version](https://camo.githubusercontent.com/cd8f8b281aa5f737202f548d12b5d57a90ef2584f0434b750a5faf4e351d34b2/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6c61726176656c2d657863657074696f6e2d6e6f746966792f76)](//packagist.org/packages/guanguans/laravel-exception-notify)[![Total Downloads](https://camo.githubusercontent.com/039509fbeeb2b3fe39cea8b739ad892c92a37d570af3d42b85f69d2b077bdf44/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6c61726176656c2d657863657074696f6e2d6e6f746966792f646f776e6c6f616473)](//packagist.org/packages/guanguans/laravel-exception-notify)[![License](https://camo.githubusercontent.com/d2ea4e1405ab8f73eefff8114d46fab657574e4758b2e9e387e7c2071454c84a/68747470733a2f2f706f7365722e707567782e6f72672f6775616e6775616e732f6c61726176656c2d657863657074696f6e2d6e6f746966792f6c6963656e7365)](//packagist.org/packages/guanguans/laravel-exception-notify)

功能
--

[](#功能)

- 监控发送 laravel 应用异常
- 支持多种通道(钉钉群机器人、飞书群机器人、Server 酱、企业微信群机器人、息知)
- 自定义发送的异常信息数据

相关项目
----

[](#相关项目)

-
-

环境要求
----

[](#环境要求)

- laravel &gt;= 5.5

安装
--

[](#安装)

```
$ composer require bing-leng-dt/laravel-exception-notify-xiavan -vvv
```

配置
--

[](#配置)

### 注册服务

[](#注册服务)

#### laravel

[](#laravel)

```
$ php artisan vendor:publish --provider="Guanguans\\LaravelExceptionNotify\\ExceptionNotifyServiceProvider"
```

#### lumen

[](#lumen)

将以下代码段添加到 `bootstrap/app.php` 文件中的 `Register Service Providers` 部分下：

```
$app->register(\Guanguans\LaravelExceptionNotify\ExceptionNotifyServiceProvider::class);
```

### 申请通道 token 等信息

[](#申请通道-token-等信息)

- [钉钉群机器人](https://developers.dingtalk.com/document/app/custom-robot-access)
- [飞书群机器人](https://www.feishu.cn/hc/zh-CN/articles/360024984973)
- [Server 酱](https://sct.ftqq.com)
- [企业微信群机器人](https://work.weixin.qq.com/help?doc_id=13376)
- [息知](https://xz.qqoq.net/#/index)

### 配置文件中配置 token 等信息

[](#配置文件中配置-token-等信息)

`config/exception-notify.php`

`.env` 文件中配置

```
EXCEPTION_NOTIFY_DEFAULT_CHANNEL=dingTalk
EXCEPTION_NOTIFY_CHANNEL_KEYWORD=keyword
EXCEPTION_NOTIFY_CHANNEL_TOKEN=fec1ddaa8a833156efb77b7865d62ae13775418030d94d05da08bfca73eeb
EXCEPTION_NOTIFY_CHANNEL_SECRET=c32bb7345c0f73da2b9786f0f7dd5083bd768a29b82e6d460149d730eee51730
```

使用
--

[](#使用)

### `app/Exceptions/Handler.php` 的 `report` 方法中添加

[](#appexceptionshandlerphp-的-report-方法中添加)

```
public function report(Exception $exception)
{
    // 添加的代码
    $this->shouldReport($exception) and \ExceptionNotifier::report($exception);
    // // 或者
    // $this->shouldReport($exception) and app('exception.notifier')->report($exception);
    // // 或者
    // $this->shouldReport($exception) and \Guanguans\LaravelExceptionNotify\Facades\Notifier::report($exception);

    parent::report($exception);
}
```

### 通知结果

[](#通知结果)

[![钉钉群机器人](docs/dingTalk.png)](docs/dingTalk.png)

[![飞书群机器人](docs/feiShu.png)](docs/feiShu.png)

[![企业微信群机器人](docs/weWork.png)](docs/weWork.png)

[![息知](docs/xiZhi.png)](docs/xiZhi.png)

测试
--

[](#测试)

```
$ composer test
```

变更日志
----

[](#变更日志)

请参阅 [CHANGELOG](CHANGELOG.md) 获取最近有关更改的更多信息。

贡献指南
----

[](#贡献指南)

请参阅 [CONTRIBUTING](.github/CONTRIBUTING.md) 有关详细信息。

安全漏洞
----

[](#安全漏洞)

请查看[我们的安全政策](../../security/policy)了解如何报告安全漏洞。

贡献者
---

[](#贡献者)

- [guanguans](https://github.com/guanguans)
- [所有贡献者](../../contributors)

协议
--

[](#协议)

MIT 许可证（MIT）。有关更多信息，请参见[协议文件](LICENSE)。

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity27

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3b8657e00638aaeb68df7263577cb38818ebb1e5e7561108b8229e2acad5337f?d=identicon)[bingLengDT](/maintainers/bingLengDT)

---

Top Contributors

[![bingLengDT](https://avatars.githubusercontent.com/u/93579835?v=4)](https://github.com/bingLengDT "bingLengDT (3 commits)")

### Embed Badge

![Health badge](/badges/bing-leng-dt-laravel-exception-notify-xiavan/health.svg)

```
[![Health](https://phpackages.com/badges/bing-leng-dt-laravel-exception-notify-xiavan/health.svg)](https://phpackages.com/packages/bing-leng-dt-laravel-exception-notify-xiavan)
```

###  Alternatives

[psr/log

Common interface for logging libraries

10.4k1.2B9.2k](/packages/psr-log)[itsgoingd/clockwork

php dev tools in your browser

5.9k27.6M94](/packages/itsgoingd-clockwork)[graylog2/gelf-php

A php implementation to send log-messages to a GELF compatible backend like Graylog2.

41838.2M138](/packages/graylog2-gelf-php)[bugsnag/bugsnag-psr-logger

Official Bugsnag PHP PSR Logger.

32132.5M2](/packages/bugsnag-bugsnag-psr-logger)[consolidation/log

Improved Psr-3 / Psr\\Log logger based on Symfony Console components.

15462.2M7](/packages/consolidation-log)[datadog/php-datadogstatsd

An extremely simple PHP datadogstatsd client

19124.6M15](/packages/datadog-php-datadogstatsd)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
