convert the query string to lower case
This commit is contained in:
parent
a2be16fe79
commit
a187ae011c
@ -25,9 +25,10 @@ class ItemsCollection
|
||||
* @param string $query
|
||||
* @return array
|
||||
*/
|
||||
public function findItem(string $query)
|
||||
public function findItem(string $query): array
|
||||
{
|
||||
return $this->data->filter(function ($val) use ($query) {
|
||||
$query = Str::lower($query);
|
||||
return Str::contains($val['_id'], $query)
|
||||
|| Str::contains($val['_name'], $query)
|
||||
|| Str::contains($val['_parent'], $query);
|
||||
|
Loading…
x
Reference in New Issue
Block a user