2017 © Pedro Peláez
 

library laravel-exception

pingqu laravel exception handler

image

ping-qu/laravel-exception

pingqu laravel exception handler

  • Monday, January 22, 2018
  • by linyueb
  • Repository
  • 5 Watchers
  • 1 Stars
  • 25 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

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

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

使用教程

1、使用composer下载这个包, (*2)

composer require ping-qu/laravel-exception

2、在laravel框架的app\Exceptions\Handler.php文件中引入, (*3)

修改app\Exceptions\Handler.php的report方法, (*4)

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


    }

The Versions

22/01 2018

dev-master

9999999-dev

pingqu laravel exception handler

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by linyue

22/01 2018

1.0.3

1.0.3.0

pingqu laravel exception handler

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by linyue

25/12 2017

1.0.2

1.0.2.0

pingqu laravel exception handler

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by linyue

29/11 2017

1.0.1

1.0.1.0

pingqu laravel exception handler

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by linyue

23/11 2017

1.0.0

1.0.0.0

pingqu laravel exception handler

  Sources   Download

MIT

The Requires

  • php >=5.3

 

by linyue