Closed f-liva closed 5 years ago
I don't really wanna do this because it's not consistent with the default search feature.
A better solution is to give more flexibility on how the compare query is constructed. Something like an easy way to override a specific method where you could add your own query logic:
example: ... inside the resource class:
protected function applySearchQuery($query, $column, $search)
{
$query->orWhere(DB::raw("LOWER({$column})"), 'LIKE', '%' . strtolower($search) . '%');
}
Maybe this is a step further?
Anyway, is this a change you want to do you directly?
Nothing here?
I'll probably try to split the query applier into a separate method or something.
As a temporary solution, you may override the searchQueryApplier
inside your base Resource
class according to your needs.
Changing the collation of MySQL is no longer a solution for searching insensitive cases with LIKE. The search field and search query must therefore be standardised in the casing.