spatie / laravel-query-builder

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

Filtering nested on nested values #883

Closed Kyzegs closed 1 year ago

Kyzegs commented 1 year ago

Hey there! I currently have a instance where I need to filter the following URL: http://127.0.0.1:8000/?filter[dates][from]=2023-08-01T22%3A00%3A00.000Z&filter[dates][to]=2023-08-24T22%3A00%3A00.000Z. This doesn't seem possible.

I've tried the following things:

AllowedFilter::exact('dates.from', 'dates.start_at'),
AllowedFilter::exact('dates[from]', 'dates.start_at'),

Is this something we can add support for? I might be able to make a PR myself if necessary and if it is not already supported. Maybe I'm overlooking it.