File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -8,6 +8,9 @@ Run the Composer require command from the Terminal:
88composer require hankz/laravel-plus-api
99```
1010
11+ > [ !TIP]
12+ > After Laravel 11, you may need to use ` php artisan install:api ` first to utilize the API.
13+
1114### 2. Setup
1215
1316This package supports Laravel's auto-discovery feature and it's ready to use once installed.
@@ -57,6 +60,14 @@ Set exception Handler.
5760in ` bootstrap/app.php ` ,add:
5861
5962``` php
63+ use Hankz\LaravelPlusApi\Classes\ApiResponseBuilder;
64+ use Illuminate\Auth\AuthenticationException;
65+ use Illuminate\Http\Request;
66+ use Illuminate\Validation\ValidationException;
67+ use Symfony\Component\HttpKernel\Exception\HttpExceptionInterface;
68+
69+ // other code...
70+
6071->withExceptions(function (Exceptions $exceptions) {
6172 $exceptions->render(function (Throwable $throwable, Request $request) {
6273
You can’t perform that action at this time.
0 commit comments