We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0f082f5 commit 50635f4Copy full SHA for 50635f4
src/EloquentFilters.php
@@ -55,7 +55,9 @@ public function apply($builder)
55
if (method_exists($this, $filter) && count($params) > 1) {
56
call_user_func_array([$this, $filter], $params);
57
} else {
58
- $this->builder->when($value ?? null, $this->$filter($value));
+ $this->builder->when($value ?? null, function () use ($filter, $value) {
59
+ return $this->$filter($value);
60
+ });
61
}
62
63
0 commit comments