A simple class that provides access to country & state list.
composer require ahmard/geodata
<?php use Ahmard\GeoData\Country; require __DIR__ . '/vendor/autoload.php'; $countries = Country::all(); $states = Country::getStates(160); var_dump($states);
info at phpclasses dot org