File tree Expand file tree Collapse file tree 2 files changed +16
-0
lines changed
Expand file tree Collapse file tree 2 files changed +16
-0
lines changed Original file line number Diff line number Diff line change 1+ <?php
2+
3+ namespace Jiannei \Response \Laravel \Http \Exceptions ;
4+
5+ use Jiannei \Response \Laravel \Support \Traits \ExceptionTrait ;
6+
7+ class Handler extends \Illuminate \Foundation \Exceptions \Handler
8+ {
9+ use ExceptionTrait;
10+ }
Original file line number Diff line number Diff line change 1313
1414use Illuminate \Support \ServiceProvider ;
1515use Jiannei \Response \Laravel \Contract \ResponseFormat ;
16+ use Jiannei \Response \Laravel \Http \Exceptions \Handler ;
1617use Jiannei \Response \Laravel \Support \Format ;
1718
1819class LaravelServiceProvider extends ServiceProvider
@@ -21,6 +22,11 @@ public function register()
2122 {
2223 $ this ->setupConfig ();
2324
25+ $ this ->app ->singleton (
26+ \Illuminate \Contracts \Debug \ExceptionHandler::class,
27+ Handler::class
28+ );
29+
2430 $ this ->app ->singleton (ResponseFormat::class, function ($ app ) {
2531 $ formatter = $ app ->config ->get ('response.format.class ' );
2632 $ config = $ app ->config ->get ('response.format.config ' );
You can’t perform that action at this time.
0 commit comments