PHPackages                             timerlau/errcode - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. timerlau/errcode

ActivePackage[Utility &amp; Helpers](/categories/utility)

timerlau/errcode
================

统一错误代码 For Laravel

v1.0.3(8y ago)318MITPHPPHP &gt;=5.5.0

Since Mar 10Pushed 8y ago1 watchersCompare

[ Source](https://github.com/timerlau/errcode)[ Packagist](https://packagist.org/packages/timerlau/errcode)[ Docs](https://github.com/timerlau/errcode.git)[ RSS](/packages/timerlau-errcode/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (5)Used By (0)

ErrorCode
=========

[](#errorcode)

统一错误代码 for Laravel

系统要求
====

[](#系统要求)

```
php >= 5.5
laravel >= 5.4

```

说明
==

[](#说明)

```
~ 统一的错误代码，方便管理

```

安装
==

[](#安装)

```
composer require timerlau/errcode

```

配置文件
====

[](#配置文件)

```
修改 config/app.php 如下：
1. providers 增加 Timerlau\Errcode\ErrcodeServiceProvider::class,
2. aliases   增加 'Errcode' => Timerlau\Errcode\Facades\Errcode::class,

php artisan vendor:publish --provider="Timerlau\Errcode\ErrcodeServiceProvider"

```

使用
==

[](#使用)

```
use Errcode;

Errcode::success();     // 获取错误码信息
Errcode::success(true);     // 获取错误码代码

Errcode::api_not_found();     // 获取错误码信息
Errcode::api_not_found(true);     // 获取错误码代码

Errcode::show(); // 可以查看所有错误代码

```

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

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 ~1 days

Total

4

Last Release

2984d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9f4b78adf346df1a5bb44ec3c9a2119e01c5dda632869e7f5bb14c66c6d1414c?d=identicon)[timerlau](/maintainers/timerlau)

---

Top Contributors

[![timerlau](https://avatars.githubusercontent.com/u/5009787?v=4)](https://github.com/timerlau "timerlau (1 commits)")

---

Tags

laravelerrcode error code

### Embed Badge

![Health badge](/badges/timerlau-errcode/health.svg)

```
[![Health](https://phpackages.com/badges/timerlau-errcode/health.svg)](https://phpackages.com/packages/timerlau-errcode)
```

###  Alternatives

[highideas/laravel-users-online

This package will provide an online users management.

203113.2k1](/packages/highideas-laravel-users-online)[stephenjude/filament-blog

Filament Blog Builder

20317.8k](/packages/stephenjude-filament-blog)[ralphjsmit/laravel-helpers

A package containing handy helpers for your Laravel-application.

13704.6k2](/packages/ralphjsmit-laravel-helpers)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11229.2k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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