Closed BastianErlerArbeit closed 3 years ago
In your filter you can override the includeFilterInput
function to not filter out empty arrays:
protected function includeFilterInput($key, $value)
{
return $value !== '' && $value !== null;
}
Hey Tucker-Eric,
in my opinion this was an API-change hidden in a minor version. And caused us a downtime. I don't know your versioning scheme, but i would only keep this in v3, or not?
We are taking care of ourselves. But i could imagine more people coming here sooner or later.
@PaulBehrendtVentoro Ahh, got it. Will get update out for this.
Thanks!
134
this Pullrequest is breaking our code because if you call
whereIn
with an empty Array in Laravel it returns query likeselect * from some_table where 0 = 1
which gives 0 results.
But because
SomeModel::filter(['id'=>[]])
no longer calls the filter function we get a query like
select * from some_table
which returns all results.