From f7542408bdc18d18009e225d8272a7ff4972d5f3 Mon Sep 17 00:00:00 2001 From: Ruben Robles Date: Mon, 22 Apr 2024 08:03:14 +0000 Subject: [PATCH] GITBOOK-4: change request with no subject merged in GitBook --- docs/responses.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/responses.md b/docs/responses.md index 4641f51..8a2165b 100644 --- a/docs/responses.md +++ b/docs/responses.md @@ -124,6 +124,15 @@ class FilmBuilder extends Builder implements ViewableBuilder } ``` +#### Disable viewable per request + +If the **viewable is implemented at the model or query builder** level **this will get called** whenever you use Apiable, you can disable it per request using the following method: + +```php +JsonApiResponse::from(Film::where('title', 'LIKE', 'The%')) + ->conditionallyLoadResults(false); +``` + #### Customise pagination method In case you want to customise the pagination used you can actually use the `paginateUsing` method: