PHPackages                             ping-qu/laravel-exception - 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. ping-qu/laravel-exception

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

ping-qu/laravel-exception
=========================

pingqu laravel exception handler

1.0.3(8y ago)154MITPHPPHP &gt;=5.3

Since Nov 23Pushed 8y ago5 watchersCompare

[ Source](https://github.com/ping-qu/laravel-exception)[ Packagist](https://packagist.org/packages/ping-qu/laravel-exception)[ RSS](/packages/ping-qu-laravel-exception/feed)WikiDiscussions master Synced yesterday

READMEChangelog (4)DependenciesVersions (5)Used By (0)

### 基于laravel框架的自定义异常模块

[](#基于laravel框架的自定义异常模块)

laravel框架是近两年兴起的一个框架，但是有一个很蛋疼的问题，laravel的异常和错误都会被渲染成一个html网页输出，这样前端 很难解析，因此我封装了一个自定义异常模块，可以让laravel框架的异常很报错全部以统一的json格式输出。

##### 使用教程

[](#使用教程)

1、使用composer下载这个包

```
composer require ping-qu/laravel-exception

```

2、在laravel框架的app\\Exceptions\\Handler.php文件中引入

修改app\\Exceptions\\Handler.php的report方法

```
public function report(Exception $exception)
    {
         if (PHP_SAPI == 'cli'){
            parent::report($exception);
         }else{
            \Pingqu\ExceptionHandler::exception_handler($exception);
         }

    }

```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity61

Established project with proven stability

 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.

###  Release Activity

Cadence

Every ~19 days

Total

4

Last Release

3032d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/20659595?v=4)[linyueb](/maintainers/linyueb)[@linyueb](https://github.com/linyueb)

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/ping-qu-laravel-exception/health.svg)

```
[![Health](https://phpackages.com/badges/ping-qu-laravel-exception/health.svg)](https://phpackages.com/packages/ping-qu-laravel-exception)
```

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