Skip to content

Commit be49616

Browse files
committed
feature: support amis empty string search
1 parent 917a1d5 commit be49616

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/Repository/EloquentRepository.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ protected function buildSearch(EloquentBuilder $query, array $search): EloquentB
107107
{
108108
$searchableAttributes = $this->searchableAttributes();
109109
foreach ($search as $attribute => $value) {
110-
if (array_key_exists($attribute, $searchableAttributes)) {
110+
if (array_key_exists($attribute, $searchableAttributes) && $value !== '' && $value !== null) {
111111
$query = call_user_func($searchableAttributes[$attribute], $query, $value, $attribute);
112112
}
113113
}

0 commit comments

Comments
 (0)