spatie / laravel-query-builder

Easily build Eloquent queries from API requests
https://spatie.be/docs/laravel-query-builder
MIT License
4.02k stars 395 forks source link

Change the way AllowedSorts are set #865

Closed luilliarcec closed 1 year ago

luilliarcec commented 1 year ago

It turns out that it is the only property that is not set when building the QueryBuilder object, it is only set if there is a request with sort key. I'm doing this PR because I'm making some classes to document my APIs that add an integration between this package and Laravel Scribe, but I can't get the value of AllowedSorts because it's not set unless the request brings the sort key.

freekmurze commented 1 year ago

The tests are failing for this one, could you have a look?

luilliarcec commented 1 year ago

Hi, @freekmurze

The test runs completely and is passing, but on completion it ends with an error code.

image

AlexVanderbist commented 1 year ago

A bit late on our end but thanks for the PR!