diff --git a/composer.json b/composer.json index 367bc31..e801c83 100755 --- a/composer.json +++ b/composer.json @@ -11,7 +11,8 @@ ], "require": { "php": ">=5.4.0", - "illuminate/database": "4.2.x|~5.0" + "illuminate/database": "4.2.x|~5.0", + "ext-mbstring": "*" }, "autoload": { "psr-4": { diff --git a/src/SearchableTrait.php b/src/SearchableTrait.php index 2f504e4..96befd8 100644 --- a/src/SearchableTrait.php +++ b/src/SearchableTrait.php @@ -36,7 +36,7 @@ public function scopeSearch(Builder $q, $search, $threshold = null, $entireText return $q; } - $search = strtolower(trim($search)); + $search = mb_strtolower(trim($search)); $words = explode(' ', $search); $selects = [];