Releases: lorisleiva/laravel-search-string
Releases · lorisleiva/laravel-search-string
v1.3.0
What's Changed
- Document case insensitive searches by @kharysharpe in #44
- Add support for Laravel 10 by @mbardelmeijer in #46
New Contributors
- @kharysharpe made their first contribution in #44
Full Changelog: v1.2.0...v1.3.0
v1.2.0
v1.1.3
v1.1.2
Add case_insensitive
option for search queries — defaults to false
for backward compatibility. (See #22)
You can set it to true
in your options amongst columns
and keywords
. For example, in the config/search-string.php
file:
return [
'default' => [
'case_insensitive' => true, // <- Globally.
// ...
],
Article::class => [
'case_insensitive' => true, // <- Only for the Article class.
// ...
],
];
When set to true
, it will lowercase both the column and the value before comparing them using the like
operator.
$value = mb_strtolower($value, 'UTF8');
$query->whereRaw("LOWER($column) LIKE ?", ["%$value%"]);
v1.1.1
v1.1.0
v1.0.4
v1.0.3
⬆️ Add support for Laravel 8
v1.0.2
Fix resolve conflict with HOA protocol