Skip to content

Commit

Permalink
use numeric check
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Jul 5, 2021
1 parent 8c0b39a commit 996256a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Engines/MeiliSearchEngine.php
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ protected function performSearch(Builder $builder, array $searchParams = [])
protected function filters(Builder $builder)
{
$filters = collect($builder->wheres)->map(function ($value, $key) {
return filter_var($value, FILTER_VALIDATE_INT) !== false
return is_numeric($value)
? sprintf('%s=%s', $key, $value)
: sprintf('%s="%s"', $key, $value);
})->values()->implode(' AND ');
Expand Down

0 comments on commit 996256a

Please sign in to comment.