Skip to content

Commit 89c1288

Browse files
committed
docs(readme): 📝 增加文件的補充說明
1 parent 91c46d8 commit 89c1288

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

docs/en/11/index.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ Run the Composer require command from the Terminal:
88
composer 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

1316
This package supports Laravel's auto-discovery feature and it's ready to use once installed.
@@ -57,6 +60,14 @@ Set exception Handler.
5760
in `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

0 commit comments

Comments
 (0)