From fbb6cb3401ea90c86c067d55b4f0494b2be056d3 Mon Sep 17 00:00:00 2001 From: jiannei Date: Wed, 13 Mar 2024 14:27:13 +0800 Subject: [PATCH] feat: support laravel11 --- src/Http/Exceptions/Handler.php | 10 ++++++++++ src/Providers/LaravelServiceProvider.php | 6 ++++++ 2 files changed, 16 insertions(+) create mode 100644 src/Http/Exceptions/Handler.php diff --git a/src/Http/Exceptions/Handler.php b/src/Http/Exceptions/Handler.php new file mode 100644 index 0000000..2ca3692 --- /dev/null +++ b/src/Http/Exceptions/Handler.php @@ -0,0 +1,10 @@ +setupConfig(); + $this->app->singleton( + \Illuminate\Contracts\Debug\ExceptionHandler::class, + Handler::class + ); + $this->app->singleton(ResponseFormat::class, function ($app) { $formatter = $app->config->get('response.format.class'); $config = $app->config->get('response.format.config');