Fix display exception handling
This commit is contained in:
parent
dca53611ff
commit
3f99b00cf7
2 changed files with 24 additions and 2 deletions
|
@ -284,4 +284,13 @@ class Handler extends ExceptionHandler
|
|||
|
||||
return $previous;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper method to allow reaching into the handler to convert an exception
|
||||
* into the expected array response type.
|
||||
*/
|
||||
public static function toArray(Throwable $e): array
|
||||
{
|
||||
return (new self(app()))->convertExceptionToArray($e);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue