= 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); } return $result->get(); } return []; } protected function multisearch($codes, $countries) { //$countries = $ // return $this->where('code',$codes)->where('country',$countries); } }