countries icon indicating copy to clipboard operation
countries copied to clipboard

Can you list the cities of a certain state?

Open fndmiranda opened this issue 7 years ago • 3 comments

fndmiranda avatar Sep 13 '17 19:09 fndmiranda

$countries = new Countries(); $collection = $countries->where('cca3', $country)->first()->hydrateCities()->cities->where('adm1name', $state);

dcrawkstar avatar Jun 10 '18 19:06 dcrawkstar

hi @dcrawkstar , its not returning the list of cities in a state.

Sunny-Ojo avatar Nov 07 '20 12:11 Sunny-Ojo

$countries = new Countries(); $collection = $countries->where('cca3', $country)->first()->hydrateCities()->cities->where('adm1name', $state);

Hi @dcrawkstar we need to get the list of cities in a state, not in a country. The data returned from cities does not include the state it is located in.

suryagunawan avatar Aug 12 '21 11:08 suryagunawan