PHPackages                             jadsalhani/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. jadsalhani/world-countries-cities

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

jadsalhani/world-countries-cities
=================================

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

v0.2.1(8y ago)623712MITPHPPHP &gt;=7.0

Since May 30Pushed 3mo ago3 watchersCompare

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

READMEChangelog (2)Dependencies (3)Versions (6)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 jadsalhani/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('Jadsalhani\WorldCountriesCities\CitiesSeeder');
    $this->call('Jadsalhani\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

38

—

LowBetter than 85% of packages

Maintenance54

Moderate activity, may be stable

Popularity20

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity52

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 ~220 days

Total

5

Last Release

3119d 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/fff1e751ec1db53a2409af0b06f96baaa67cabb1ffa4c57768742df0d87d9336?d=identicon)[jadsalhani](/maintainers/jadsalhani)

---

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/jadsalhani-world-countries-cities/health.svg)

```
[![Health](https://phpackages.com/badges/jadsalhani-world-countries-cities/health.svg)](https://phpackages.com/packages/jadsalhani-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)
