2017 © Pedro Peláez
 

package errcode

统一错误代码 For Laravel

image

timerlau/errcode

统一错误代码 For Laravel

  • Wednesday, March 14, 2018
  • by timerlau
  • Repository
  • 1 Watchers
  • 1 Stars
  • 5 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

ErrorCode

统一错误代码 for Laravel, (*1)

系统要求

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(); // 可以查看所有错误代码

The Versions

14/03 2018

dev-master

9999999-dev https://github.com/timerlau/errcode.git

统一错误代码 For Laravel

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by songmw

laravel 统一错误代码 errcode error code

14/03 2018

v1.0.3

1.0.3.0 https://github.com/timerlau/errcode.git

统一错误代码 For Laravel

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by songmw

laravel 统一错误代码 errcode error code

14/03 2018

v1.0.2

1.0.2.0 https://github.com/timerlau/errcode.git

统一错误代码 For Laravel

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by songmw

laravel 统一错误代码 errcode error code

10/03 2018

v1.0.1

1.0.1.0 https://github.com/timerlau/errcode.git

统一错误代码 For Laravel

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by songmw

laravel 统一错误代码 errcode error code

10/03 2018

v1.0.0

1.0.0.0 https://github.com/timerlau/errcode.git

统一错误代码 For Laravel

  Sources   Download

MIT

The Requires

  • php >=5.5.0

 

by songmw

laravel 统一错误代码 errcode error code