Download the PHP package lokiwich/scramble-spatie-query-builder without Composer
On this page you can find all versions of the php package lokiwich/scramble-spatie-query-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lokiwich/scramble-spatie-query-builder
More information about lokiwich/scramble-spatie-query-builder
Files in lokiwich/scramble-spatie-query-builder
Package scramble-spatie-query-builder
Short Description ScrambleSpatieQueryBuilder — automatically document Spatie Query Builder in Dedoc Scramble OpenAPI docs.
License MIT
Informations about the package scramble-spatie-query-builder
ScrambleSpatieQueryBuilder
Automatically document Spatie Laravel Query Builder filters, sorts, includes, and fields in Dedoc Scramble OpenAPI docs.
No PHPDoc annotations required — the package inspects your controller code and registers Scramble extensions automatically.
Requirements
- PHP 8.3+
- Laravel 12 or 13
dedoc/scramble^0.13spatie/laravel-query-builder^7.0
Installation
The service provider auto-registers four Scramble operation transformers. You do not need to add anything to config/scramble.php.
Usage
Use Spatie Query Builder in your controllers as usual:
Scramble will document query parameters using names from config/query-builder.php (filter, sort, include, fields). When scramble.flatten_deep_query_parameters is true (default), filters and fields use bracket notation (filter[name], fields[users]).
Filter parameters are documented only when you call allowedFilters() explicitly, matching Spatie's filtering rules. Supported definitions include variadic strings, arrays, AllowedFilter::partial / exact / beginsWith / endsWith / operator / scope / belongsTo / callback / custom / trashed, filter aliases, groupOr / groupAnd, and chained ignore(), nullable(), and default().
Customization
Hook into any extension before parameters are added:
Return true from the hook to prevent the parameter from being added.
Testing
Tests use Orchestra Testbench and Scramble's Generator directly — no host application required.
License
MIT © lokiwich
All versions of scramble-spatie-query-builder with dependencies
dedoc/scramble Version ^0.13
illuminate/support Version ^12.0|^13.0
spatie/laravel-query-builder Version ^7.0