diff --git a/src/SearchableTrait.php b/src/SearchableTrait.php index 96befd8..2d20ec2 100644 --- a/src/SearchableTrait.php +++ b/src/SearchableTrait.php @@ -241,7 +241,7 @@ protected function getSearchQuery(Builder $query, $column, $relevance, array $wo * @return string */ protected function getCaseCompare($column, $compare, $relevance) { - $field = "LOWER(" . $column . ") " . $compare . " ?"; + $field = "LOWER(`" . $column . "`) " . $compare . " ?"; return '(case when ' . $field . ' then ' . $relevance . ' else 0 end)'; }