PHPackages                             dukenicols/world-countries-cities - 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. [Database &amp; ORM](/categories/database)
4. /
5. dukenicols/world-countries-cities

ActiveLibrary[Database &amp; ORM](/categories/database)

dukenicols/world-countries-cities
=================================

A package to delivery a wide seed array of Countries &amp; their respective cities.

v0.2.2(8y ago)09MITPHPPHP &gt;=7.0

Since May 30Pushed 8y agoCompare

[ Source](https://github.com/dukenicols/Laravel-Countries-Cities)[ Packagist](https://packagist.org/packages/dukenicols/world-countries-cities)[ RSS](/packages/dukenicols-world-countries-cities/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (3)Versions (8)Used By (0)

World Countries &amp; Cities
============================

[](#world-countries--cities)

A Laravel package for using world's popular countries and cities.

Supports
--------

[](#supports)

- Laravel 5.5+

Features
--------

[](#features)

- Add the countries/cities to the database using migration and seeders.
- Use the countries/cities directly from the package without using the database.

Installation
------------

[](#installation)

Require the package with composer:

```
composer require Dukenicols/world-countries-cities

```

The ServiceProvider will be added to the providers array in config/app.php through auto-discovery

Usage
-----

[](#usage)

### Migration

[](#migration)

After running `php artisan vendor:publish` you can directly run:

```
php artisan migrate

```

### Seeders

[](#seeders)

In order to seed the migrated tables, you need to edit `database/seeds/DatabaseSeeder.php` and add the following lines:

```
public function run()
{
    Model::unguard();

    $this->call('Dukenicols\WorldCountriesCities\CitiesSeeder');
    $this->call('Dukenicols\WorldCountriesCities\CountriesSeeder');
}
```

Then run:

```
php artisan db:seed

```

Be careful, the seeders files truncate the tables before inserting, to prevent any duplication.

### Direct usage

[](#direct-usage)

To be implementated.

---

Credits
-------

[](#credits)

The data is based on MySQL's [world database example](https://dev.mysql.com/doc/world-setup/en/).

License
-------

[](#license)

MIT License

Copyright (c) 2017 Jad Salhani

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80% 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

Every ~153 days

Recently: every ~202 days

Total

7

Last Release

3078d ago

PHP version history (3 changes)v0.1.0PHP &gt;=5.4.0

v0.2.0PHP &gt;=7.0.0

v0.2.1PHP &gt;=7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4ab226a34fc6d825cff9c77aa8aab4412b328b050255ad7200561bcf21e9aa85?d=identicon)[dukenicols](/maintainers/dukenicols)

---

Top Contributors

[![AmmarCodes](https://avatars.githubusercontent.com/u/351256?v=4)](https://github.com/AmmarCodes "AmmarCodes (12 commits)")[![buro-buro](https://avatars.githubusercontent.com/u/13950212?v=4)](https://github.com/buro-buro "buro-buro (2 commits)")[![jadsalhani](https://avatars.githubusercontent.com/u/6623311?v=4)](https://github.com/jadsalhani "jadsalhani (1 commits)")

---

Tags

laraveldatabasecountriesseedcities

### Embed Badge

![Health badge](/badges/dukenicols-world-countries-cities/health.svg)

```
[![Health](https://phpackages.com/badges/dukenicols-world-countries-cities/health.svg)](https://phpackages.com/packages/dukenicols-world-countries-cities)
```

###  Alternatives

[nwidart/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class.

37839.1k](/packages/nwidart-db-exporter)[eighty8/laravel-seeder

Versioned, environment-based Seeders in Laravel

1857.1k](/packages/eighty8-laravel-seeder)[elimuswift/db-exporter

Export your database quickly and easily as a Laravel Migration and all the data as a Seeder class.

364.7k](/packages/elimuswift-db-exporter)

PHPackages © 2026

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