6
0
Fork 0

异常上下文保留请求参数

release
李静 2021-12-18 14:27:56 +08:00
parent 6f598af1fc
commit bc7989f9ef
1 changed files with 16 additions and 0 deletions

View File

@ -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.
*