File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -130,14 +130,14 @@ you can use the `ExceptionHandler::renderAsApiResponse` helper.
130
130
``` php
131
131
// file: Exception/Handler.php
132
132
133
- use KodePandai\ApiResponse\ExceptionHandler;
133
+ use KodePandai\ApiResponse\ExceptionHandler as ApiExceptionHandler ;
134
134
135
135
// new laravel (>= 8)
136
136
public function register()
137
137
{
138
138
$this->renderable(function (Throwable $e, $request) {
139
139
if ($request->wantsJson()) {
140
- return ExceptionHandler ::renderAsApiResponse($e);
140
+ return ApiExceptionHandler ::renderAsApiResponse($e);
141
141
}
142
142
});
143
143
}
@@ -146,7 +146,7 @@ public function register()
146
146
public function render($request, Throwable $exception)
147
147
{
148
148
if ($request->wantsJson()) {
149
- return ExceptionHandler ::renderAsApiResponse($exception);
149
+ return ApiExceptionHandler ::renderAsApiResponse($exception);
150
150
}
151
151
152
152
return parent::render($request, $exception);
You can’t perform that action at this time.
0 commit comments