PHPackages                             kalimeromk/countries - 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. kalimeromk/countries

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

kalimeromk/countries
====================

Laravel Countries is a package for Laravel, providing Almost ISO 3166\_2, 3166\_3, currency, Capital and more for all countries.

v1.6(7mo ago)2239MITPHPPHP ^7.4 || ^8.0 || ^8.4

Since Feb 26Pushed 7mo ago1 watchersCompare

[ Source](https://github.com/KalimeroMK/countries)[ Packagist](https://packagist.org/packages/kalimeromk/countries)[ RSS](/packages/kalimeromk-countries/feed)WikiDiscussions master Synced today

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

Countries
=========

[](#countries)

[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)![Travis](https://camo.githubusercontent.com/5c110ccbc251686414f1f73adafadfae2cbc325cc428da5a0c914f0d292d4a35/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6b616c696d65726f6d6b2f636f756e74726965732e7376673f7374796c653d666c61742d737175617265)[![Total Downloads](https://camo.githubusercontent.com/af2b9450d2490080a1b2bad92cef5adec797d87e26493574c8ee466ce289a215/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6b616c696d65726f6d6b2f636f756e74726965732e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/kalimeromk/countries)

Usage
-----

[](#usage)

Laravel Countries is a package for Laravel, providing Almost ISO 3166\_2, 3166\_3, currency, Capital and more for all countries including states and cities .

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

[](#installation)

You can install this package via Composer:

`composer require kalimeromk/countries`

#### Or form composer.json file

[](#or-form-composerjson-file)

Add `kalimeromk/countries` to `composer.json`.

```
"kalimeromk/countries": "*"

```

Run `composer update` to pull down the latest version of Country List.

Edit `app/config/app.php` and add the `provider` and `filter`

```
'providers' => [
    'Kalimeromk\Countries\CountriesServiceProvider',
]

```

Now add the alias.

```
'aliases' => [
    'Countries' => 'Kalimeromk\Countries\CountriesServiceProvider',
]

```

Model
-----

[](#model)

You can start by publishing the configuration. This is an optional step, it contains the table names for needed table and does not need to be altered. If the default names `countries`,`states`,`cities` suits you, leave it. Otherwise, run the following command

```
$ php artisan vendor:publish --tag=countries-config

```

If need to make some changes to migrate file use flowing command to generate the migration file:

```
$ php artisan vendor:publish --tag=countries-migration

```

It will generate the migration in databases/migrations dir

In the package we have tree models `Country`,`State`,`City` with needed relation to be used out of the box but if changes just extend models :)

To finish everything need to seed the data into the table, so 1st need to run

```
$ php artisan vendor:publish --tag=countries-seeders

```

and add this code to DatabaseSeeder class

```
//Seed the countries
 $this->call(CountriesSeeder::class);
 $this->call(StatesSeeder::class);
 $this->call(CitiesSeeder::class);

```

You may now run it with the artisan migrate command:

```
$ php artisan migrate --seed

```

After running this command the filled countries table will be available

Testing
-------

[](#testing)

Run the tests with:

```
vendor/bin/phpunit
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Zoran](https://github.com/kalimeromk)
- [All Contributors](https://github.com/kalimeromk/countries/contributors)

Security
--------

[](#security)

If you discover any security-related issues, please email  instead of using the issue tracker.

License
-------

[](#license)

The MIT License (MIT). Please see [License File](/LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 88% of packages

Maintenance64

Regular maintenance activity

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity68

Established project with proven stability

 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

Every ~168 days

Recently: every ~252 days

Total

7

Last Release

215d ago

PHP version history (2 changes)v1.1PHP &gt;=7.4

v1.6PHP ^7.4 || ^8.0 || ^8.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/472c4da0220f15747dd81d3a27ffbba022a06ab20f64a367ddcaacd790d812d7?d=identicon)[KalimeroMK](/maintainers/KalimeroMK)

---

Top Contributors

[![KalimeroMK](https://avatars.githubusercontent.com/u/24772657?v=4)](https://github.com/KalimeroMK "KalimeroMK (3 commits)")

---

Tags

citycountrieslaravelstateslaravel

### Embed Badge

![Health badge](/badges/kalimeromk-countries/health.svg)

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

###  Alternatives

[stephenjude/filament-blog

Filament Blog Builder

20619.4k](/packages/stephenjude-filament-blog)[datomatic/nova-detached-actions

A Laravel Nova tool to allow for placing actions in the Nova toolbar detached from the checkbox selection mechanism.

11273.0k](/packages/datomatic-nova-detached-actions)

PHPackages © 2026

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