Skip to content

Commit 0a6d59e

Browse files
authored
chore: update documentation
1 parent 462433f commit 0a6d59e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -130,14 +130,14 @@ you can use the `ExceptionHandler::renderAsApiResponse` helper.
130130
```php
131131
// file: Exception/Handler.php
132132

133-
use KodePandai\ApiResponse\ExceptionHandler;
133+
use KodePandai\ApiResponse\ExceptionHandler as ApiExceptionHandler;
134134

135135
// new laravel (>= 8)
136136
public function register()
137137
{
138138
$this->renderable(function (Throwable $e, $request) {
139139
if ($request->wantsJson()) {
140-
return ExceptionHandler::renderAsApiResponse($e);
140+
return ApiExceptionHandler::renderAsApiResponse($e);
141141
}
142142
});
143143
}
@@ -146,7 +146,7 @@ public function register()
146146
public function render($request, Throwable $exception)
147147
{
148148
if ($request->wantsJson()) {
149-
return ExceptionHandler::renderAsApiResponse($exception);
149+
return ApiExceptionHandler::renderAsApiResponse($exception);
150150
}
151151

152152
return parent::render($request, $exception);

0 commit comments

Comments
 (0)