Closed harunB10 closed 7 years ago
I have a country field and array of searchableCountries.
$searchableCountry = explode(",", Input::get('searchableCountry')); if ($searchableCountry != null) { $results = $cl->Filter('country', [$searchableCountry]); }
However, when I search using single string it works:
$country = Input::get('country'); if ($country != "" || $country != null) { $results = $cl->Filter('country', [$country]); }
Problem was with the [] brackets... I should have used:
if ($searchableCountry != null) { $results = $cl->Filter('country', $searchableCountry); }
I have a country field and array of searchableCountries.
However, when I search using single string it works: