public function scopeCountry($query, $name = null, $featureCodes = ['PCLI'])
    {
        return $this->scopeSearchByFeature($query,$name,'A',$featureCodes);
    }
public function scopeCountry($query, $name = null, $featureCodes = ['PCLI'])
    {
        return $this->scopeSearchByFeature($query,$name,'A',$featureCodes);
    }
public function scopeCountry ( $ query , $ name = null , $ featureCodes = [ 'PCLI' ] ) { return $ this -> scopeSearchByFeature ( $ query , $ name , 'A' , $ featureCodes ) ; }
Build a query to find major ccountries. Accepts wildcards eg. '%Finland%'

Suggested index for search:
ALTER TABLE geonames_geonames ADD INDEX geonames_geonames_feature_name_index
(`feature_class`,`feature_code`,`name`);

@param \Illuminate\Database\Query\Builder|\Illuminate\Database\Eloquent\Builder $query
@param String $name
@param array $featureCodes List of feature codes to use when returning results
defaults to ['PCLI']
@return \Illuminate\Database\Query\Builder
Build a query to find major ccountries . Accepts wildcards eg . %Finland%