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: