From bc7989f9ef40d0ec7e6d3c6bba030d7f8c0e86dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9D=8E=E9=9D=99?= Date: Sat, 18 Dec 2021 14:27:56 +0800 Subject: [PATCH] =?UTF-8?q?=E5=BC=82=E5=B8=B8=E4=B8=8A=E4=B8=8B=E6=96=87?= =?UTF-8?q?=E4=BF=9D=E7=95=99=E8=AF=B7=E6=B1=82=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/Exceptions/Handler.php | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/app/Exceptions/Handler.php b/app/Exceptions/Handler.php index 0982dad3..8543b205 100644 --- a/app/Exceptions/Handler.php +++ b/app/Exceptions/Handler.php @@ -31,6 +31,22 @@ class Handler extends ExceptionHandler 'password_confirmation', ]; + /** + * Get the default context variables for logging. + * + * @return array + */ + protected function context() + { + try { + return array_merge(parent::context(), [ + 'params' => request()->except($this->dontFlash), + ]); + } catch (Throwable $e) { + return []; + } + } + /** * Register the exception handling callbacks for the application. *