PHPackages                             eugenecooper/world-locations - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. eugenecooper/world-locations

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

eugenecooper/world-locations
============================

Allows to retrieve all world's countries, cities and regions

v0.1.3(9y ago)028MITPHPPHP ^5.6|^7.0

Since Jan 14Pushed 9y ago1 watchersCompare

[ Source](https://github.com/eugenecooper/world-locations)[ Packagist](https://packagist.org/packages/eugenecooper/world-locations)[ Docs](https://github.com/eugenecooper/world-locations)[ RSS](/packages/eugenecooper-world-locations/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

World-Locations
===============

[](#world-locations)

This simple package allows to retrieve all world's countries, a certain country regions and cities, etc. The code is relying on vk.com public API, so if you'll need to make too much requests you should cache results or save them to your database.

Install
-------

[](#install)

Via Composer

```
$ composer require eugenecooper/world-locations
```

Usage
-----

[](#usage)

```
$locations = new \EugeneCooper\WorldLocations\Locations;

// Obtain an array of all world's countries
$locations->getCountries();
// Obtain an array of all country regions ($country_id can be obtained with the method above)
$locations->getCountryRegions($country_id);
// Obtain an array of all country cities
$locations->getCountryCities($country_id);
// Obtain an array of all country region's cities ($region_id can be obtained with methods above)
$locations->getRegionCities($country_id, $region_id);
```

License
-------

[](#license)

The MIT License (MIT).

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

3404d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/75191f939aee64e753855a3601c2180ba3d8242fe06139929e1a431c67fd2cda?d=identicon)[eugenecooper](/maintainers/eugenecooper)

---

Top Contributors

[![eugenecooper](https://avatars.githubusercontent.com/u/8261869?v=4)](https://github.com/eugenecooper "eugenecooper (13 commits)")

---

Tags

countriesliststatesglobalcitiesallregionsprovinces

### Embed Badge

![Health badge](/badges/eugenecooper-world-locations/health.svg)

```
[![Health](https://phpackages.com/badges/eugenecooper-world-locations/health.svg)](https://phpackages.com/packages/eugenecooper-world-locations)
```

###  Alternatives

[pragmarx/countries

PHP Countries and Currencies

1.9k3.3M18](/packages/pragmarx-countries)[pragmarx/countries-laravel

Countries for Laravel

1471.1M2](/packages/pragmarx-countries-laravel)[dougsisk/laravel-country-state

Country &amp; state helper for Laravel.

1681.7M](/packages/dougsisk-laravel-country-state)[dipeshsukhia/laravel-country-state-city-data

Country State City Data Provider

8230.8k](/packages/dipeshsukhia-laravel-country-state-city-data)[gerardojbaez/geodata

Laravel 5.2 package that provides basic geographical data like Countries, Regions and Cities.

3211.9k](/packages/gerardojbaez-geodata)[usamamuneerchaudhary/country-city-state

Country City State Data Provider for Laravel 12+

242.6k](/packages/usamamuneerchaudhary-country-city-state)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
