Releases: exonn-GmbH/scramble-spatie-query-builder
Releases · exonn-GmbH/scramble-spatie-query-builder
v1.0.2
Allow changing filtering mode without changing code.
Instead of choosing single filtering mode, e.g. exact, partial, etc
allowedFilters([
AllowedFilter::exact('id'),
AllowedFilter::partial('title'),
])
You can 'autoDetect' filtering mode (maybe autoDetect is not best word for this feature).
allowedFilters([
AllowedFilter::autoDetect('id'),
AllowedFilter::autoDetect('title'),
])
To pick desired filtering mode just provide additional query parameter filter_mode
?filter[title]=Iphone&filter_mode[title]=starts_with
if filtering mode isn't specified for a field, then by default 'partial' mode will be used
Add basic tests
Every extension now has basic tests
v1.0.0
v0.9.2
Extension failed to detect query builder usage
The extension was designed in such a way that it tried to detect method calls one after another in a loop.
The order was.
allowedFiltering, allowSorting, allowSorts, allowFields.
If one of the methods wasn't found, then loop would stop and all following methods would not even be tested