rinvex / countries

Rinvex Country is a simple and lightweight package for retrieving country details with flexibility. A whole bunch of data including name, demonym, capital, iso codes, dialling codes, geo data, currencies, flags, emoji, and other attributes for all 250 countries worldwide at your fingertips.
https://rinvex.com
MIT License
1.66k stars 208 forks source link

Get all country objects #60

Closed joshbrw closed 7 years ago

joshbrw commented 7 years ago

Any way of getting all countries as Country objects instead of an array?

juanmiguel431 commented 7 years ago

Is there a way to get all the country list?

Omranic commented 7 years ago

@joshbrw Yep, countries(false, true); The second argument is a hydrate flag, that will return Country objects rather than plain array. Enjoy 😉

@juanmiguel431 Sure, simply countries(). That's it 👍 P.S. Alternative way is to use Rinvex\Country\CountryLoader::countries(); no difference, it's purely up to you to use the helper or the fully qualified namespace.

Please don't hesitate to ask for further assistance, you can reach out via slack https://chat.rinvex.com too.