diff --git a/app/Models/IkeaProducts.php b/app/Models/IkeaProducts.php index 2f0bac0..0b71321 100644 --- a/app/Models/IkeaProducts.php +++ b/app/Models/IkeaProducts.php @@ -27,7 +27,7 @@ class IkeaProducts extends Model protected function search($field, $text, $country) { - if ((strlen($text) >= 2 && $field == "name") || (strlen($text) > 3 && $field == 'typeName') || (strlen($text) == 8 && $field = 'code')) { + if ((strlen($text) >= 2 && $field == "name") || (strlen($text) > 3 && $field == 'typeName') || (strlen($text) == 8 && $field == 'code')) { $result = $this->where($field, 'LIKE', '%' . $text . '%'); if ($country != '') { $result->where('country', $country);