Skip to content

Releases: exonn-GmbH/scramble-spatie-query-builder

v1.0.4

05 Sep 15:54
Compare
Choose a tag to compare
support multiple versions of scramble

v1.0.3

05 Sep 13:22
Compare
Choose a tag to compare
update scramble and laravel-query-builder version

v1.0.2

15 Aug 12:28
Compare
Choose a tag to compare

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

19 Jun 15:46
Compare
Choose a tag to compare

split the extension into smaller ones

  • AllowedFiltersExtension
  • AllowedFieldsExtension
  • AllowedSortsExtension
  • AllowedIncludesExtension

extend query param types

  • filter - object
  • sort - array | sring
  • includes - array | string
  • fields - array | string

v0.9.2

07 Jun 13:39
6766333
Compare
Choose a tag to compare

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

v0.9.1

05 Apr 15:27
bd14fe0
Compare
Choose a tag to compare

Support getting values from a controller method or a controller property

This is now supported

QueryBuilder::for($model)->allowedFilters($this->filters);
QueryBuilder::for($model)->allowedFilters($this->filters());

v0.9.0

04 Apr 14:51
4cd4e3a
Compare
Choose a tag to compare

Support laravel 11

v0.8.3

28 Sep 15:00
Compare
Choose a tag to compare
update README.md