label with code and fix bug with search null country
Some checks are pending
deploy / deploy (push) Waiting to run
Some checks are pending
deploy / deploy (push) Waiting to run
This commit is contained in:
@@ -31,9 +31,9 @@ class IkeaProducts extends Model
|
||||
if ($country != '') $result = $result->where('country',$country);
|
||||
return $result->get();
|
||||
} else if (strlen($item >= 5)) {
|
||||
if ($country != '') $result = $this->where('country',$country);
|
||||
$result = $result->where(function ($query) use ($item) { $query->where('typeName', 'LIKE', '%' . $item . '%')->orWhere('name', 'LIKE', '%' . $item . '%'); } );
|
||||
|
||||
$result = $this->where(function ($query) use ($item) { $query->where('typeName', 'LIKE', '%' . $item . '%')->orWhere('name', 'LIKE', '%' . $item . '%'); } );
|
||||
if ($country != '') $result = $result->where('country',$country);
|
||||
|
||||
return $result->get();
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user