src/Models/GeonamesGeoname.php
public function scopeCity($query, $name = null, $featureCodes = ['PPLC', 'PPLA', 'PPLA2', 'PPLA3'])
    {
        return $this->scopeSearchByFeature($query,$name,'P',$featureCodes);
    }
public function scopeCity($query, $name = null, $featureCodes = ['PPLC', 'PPLA', 'PPLA2', 'PPLA3'])
    {
        return $this->scopeSearchByFeature($query,$name,'P',$featureCodes);
    }
Build a query to find major cities. Accepts wildcards eg. 'Helsin%'

Suggested index for search:
ALTER TABLE geonames_geonames ADD INDEX geonames_geonames_feature_name_index
(`feature_class`,`feature_code`,`name`);
and if you will limit queries by country you should also use:
ALTER TABLE geonames_geonames ADD INDEX geonames_geonames_country_feature_name_index
(`country_code`,`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 ['PPLC','PPLA','PPLA2', 'PPLA3']
@return \Illuminate\Database\Query\Builder