PHPackages                             netcore/module-country - 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. netcore/module-country

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

netcore/module-country
======================

Country module for Netcore CMS ecosystem

v1.1.3(8y ago)0655PHPPHP &gt;=7.1

Since Feb 11Pushed 8y ago4 watchersCompare

[ Source](https://github.com/netcore/module-country)[ Packagist](https://packagist.org/packages/netcore/module-country)[ RSS](/packages/netcore-module-country/feed)WikiDiscussions master Synced yesterday

READMEChangelog (5)DependenciesVersions (8)Used By (0)

Description
-----------

[](#description)

This module provides helper methods to work with lists of countries and currencies

Pre-installation
----------------

[](#pre-installation)

This package is part of Netcore CMS ecosystem and is only functional in a project that has the following packages installed:

1.

### Installation

[](#installation)

- Require this package using composer

```
composer require netcore/module-country

```

- Publish configuration, migrations and assets

```
php artisan module:publish-config Country
php artisan module:publish-migration Country
php artisan module:publish Country
php artisan migrate

```

- Seed the configuration to database

```
php artisan module:seed Country

```

Usage
-----

[](#usage)

- Get all countries:

```
country()->all();
```

- Find a country by its `ISO 3166-2` code:

```
$country = country()->findByCode('SE');
$country->code; // SE
$country->name; // Sweden
$country->capital; // Stockholm
$country->full_name; // Kingdom of Sweden
$country->calling_code; // 46
$country->eea; // true
$country->flag_url; // Will return asset URL to the country flag
```

- Get all countries as a collection for select lists (will return a collection in this format - ID =&gt; Country name)

```
country()->getSelectList();
```

You can also attach a country or a currency to any model:

```
public function country(): Illuminate\Database\Eloquent\Relations\BelongsTo
{
    return $this->belongsTo(Modules\Country\Models\Country::class);
}
```

```
public function currency(): Illuminate\Database\Eloquent\Relations\BelongsTo
{
    return $this->belongsTo(Modules\Country\Models\Currency::class);
}
```

Disclaimer
----------

[](#disclaimer)

We take no responsibility for the accuracy of the country, currency and flag lists provided in the source files. The lists were made diregarding any political and religious views. If you find the country list inaccurate, feel free to fork the repository and change the lists how you wish.

Todo:
-----

[](#todo)

- Add unit tests
- Make countries and currencies manageable in the admin panel

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 53.3% 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 ~19 days

Recently: every ~5 days

Total

7

Last Release

2946d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/e524527cce55f4877966909320b064763f66f0c89e3edb5c18cecda4bc01cf24?d=identicon)[netcorelv](/maintainers/netcorelv)

---

Top Contributors

[![NViktors](https://avatars.githubusercontent.com/u/26169825?v=4)](https://github.com/NViktors "NViktors (8 commits)")[![gstvr](https://avatars.githubusercontent.com/u/13051632?v=4)](https://github.com/gstvr "gstvr (7 commits)")

### Embed Badge

![Health badge](/badges/netcore-module-country/health.svg)

```
[![Health](https://phpackages.com/badges/netcore-module-country/health.svg)](https://phpackages.com/packages/netcore-module-country)
```

###  Alternatives

[funstaff/tika

libs for tika wrapper

1124.4k](/packages/funstaff-tika)

PHPackages © 2026

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