I developed this package based on the recent use-case in one of the app where we need to get these details and store them back, found few APIs but are paid and providing additional data, but in this case, we're only interested in name of each entity.

Checkout the recently launched simple Laravel package for getting Country, City & State data of the world, all through a comfortable laravel syntax using Eloquent.

This Package comes with a simple seeders supported by Laravel 8.* & also provides models so you can use it based on your project requirement by following the simple steps below.

Github

https://github.com/usamamuneerchaudhary/country-city-state

Installation

composer require usamamuneerchaudhary/country-city-state

Usage

After getting the repo in your project.

php artisan vendor:publish --tag=CountryCityState

composer dump-autoload

php artisan migrate --seed

What’s more?

Moreover, the recent release includes phone_numbers for the countries and added ISO and numeric codes for countries.

Try it out and let know in the comments below if you faced any issues regarding setup.

You may also Like