Skip to content

Commit 84650a2

Browse files
committed
Update readme
1 parent 053c419 commit 84650a2

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

README.md

+12
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ composer require cerbero/lazy-json-pages
4444
* [👽 Custom paginations](#-custom-paginations)
4545
* [🚀 Requests optimization](#-requests-optimization)
4646
* [💢 Errors handling](#-errors-handling)
47+
* [🤝 Laravel integration](#-laravel-integration)
4748

4849

4950
### 👣 Basics
@@ -288,6 +289,17 @@ If you find yourself implementing the same custom pagination in different projec
288289
> [!WARNING]
289290
> The documentation of this feature is a work in progress.
290291
292+
293+
### 🤝 Laravel integration
294+
295+
If used in a [Laravel](https://laravel.com) project, Lazy JSON Pages automatically fires events when:
296+
- an HTTP request is about to be sent, by firing `Illuminate\Http\Client\Events\RequestSending`
297+
- an HTTP response is received, by firing `Illuminate\Http\Client\Events\ResponseReceived`
298+
- a connection failed, by firing `Illuminate\Http\Client\Events\ConnectionFailed`
299+
300+
This is especially handy for debugging tools like [Laravel Telescope](https://laravel.com/docs/telescope) or [Spatie Ray](https://spatie.be/docs/ray/installation-in-your-project/laravel) or for triggering the related event listeners.
301+
302+
291303
## 📆 Change log
292304

293305
Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

0 commit comments

Comments
 (0)