PHPackages                             limanweb/iso-codes - 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. limanweb/iso-codes

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

limanweb/iso-codes
==================

Country, currency and other ISO codes for Laravel

v1.0(6y ago)06MITPHPPHP &gt;=7.2.0

Since Apr 13Pushed 5y ago1 watchersCompare

[ Source](https://github.com/limanweb/iso-codes)[ Packagist](https://packagist.org/packages/limanweb/iso-codes)[ RSS](/packages/limanweb-iso-codes/feed)WikiDiscussions master Synced 4d ago

READMEChangelog (1)DependenciesVersions (2)Used By (0)

limanweb/iso-codes
==================

[](#limanwebiso-codes)

This package provides any ISO-code lists to use in your Laravel-application.

List of sections and available locales:

- **iso\_country** - ISO 3166-1 country codes;
    - locales: `en`, `fr`, `ru`, `ka`, `hy`
- **iso\_currency** - ISO 4217 currency codes;
    - locales: `en`, `ru`, `ka`

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

[](#installation)

Run command:

```
composer require "limanweb/iso-codes"
```

Add service provider class to `provider` section of your `config/app.php`

```
    Limanweb\IsoCodes\Providers\IsoCodesServiceProvider::class,
```

Add alias for facade to `alias` section of your `config/app.php`

```
    'IsoCodes' => Limanweb\IsoCodes\Services\IsoCodesServiceFacade::class,
```

Run command:

```
php artisan vendor:publish
```

and input index number of `Limanweb\IsoCodes\Providers\IsoCodesServiceProvider` provider.

Using
-----

[](#using)

Service `Limanweb\IsoCodes\Service\IsoCodesService` provides a method `get()` to get any data.

You can access to service throught facade alias `\IsoCodes`

Syntax:

```
\IsoCode::get($section, $path = null, $locale = null)

```

Arguments:

- **$section** - section name. Argument is required.
- **$path** - dot-path to filter result. Argument is not required.
- **$locale** - locale name. Argument is not required. By default is current application locale.

Examples
--------

[](#examples)

To get full country list put `iso_country` section name into first argument

```
>>> IsoCodes::get('iso_country')
=> [
     "AFG" => [
       "alpha2" => "AF",
       "alpha3" => "AFG",
       "num" => 4,
       "title" => "Afghanistan",
     ],
     "ALB" => [
       "alpha2" => "AL",
       "alpha3" => "ALB",
       "num" => 8,
       "title" => "Albania",
     ],
     ...
   ]

```

To get one country item you can put second argument

```
>>> IsoCodes::get('iso_country','USA')
=> [
     "alpha2" => "US",
     "alpha3" => "USA",
     "num" => 840,
     "title" => "United States of America (the)",
   ]

```

By default title translates to current application locale. Use third argument to get data in other locale (if it available).

```
>>> IsoCodes::get('iso_country','USA', 'ru')
=> [
     "alpha2" => "US",
     "alpha3" => "USA",
     "num" => 840,
     "title" => "США",
   ]

```

To get full currency list put `iso_currency` section name into first argument

```
>>> IsoCodes::get('iso_currency')
=> [
     "AED" => [
       "alpha" => "AED",
       "num" => 784,
       "minor_unit" => 2,
       "title" => "United Arab Emirates dirham",
     ],
     "AFN" => [
       "alpha" => "AFN",
       "num" => 971,
       "minor_unit" => 2,
       "title" => "Afghan afghani",
     ],
     ...
   ]

```

Features of the implementation
------------------------------

[](#features-of-the-implementation)

Service class is singleton and has only one instance in application.

Service use two level cache to store compiled (translated) data. First level (L1) cache is a service class property with one request processing lifetime. And second level (L2) cache is a system cache.

You can disable using of cache with `use_cache` and `use_local_cache` options in `config/limanweb/iso_codes/config.php`. Set `use_cache` to false for disable using of system cache (L2). Set `use_local_cache` to false for disable using of local cache (L1).

###  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

Maturity51

Maturing project, gaining track record

 Bus Factor1

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

2223d ago

### Community

Maintainers

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

---

Top Contributors

[![ocs-laravel](https://avatars.githubusercontent.com/u/72538616?v=4)](https://github.com/ocs-laravel "ocs-laravel (6 commits)")[![limanweb](https://avatars.githubusercontent.com/u/17918827?v=4)](https://github.com/limanweb "limanweb (3 commits)")

---

Tags

laravelcurrencyeloquentisocountry

### Embed Badge

![Health badge](/badges/limanweb-iso-codes/health.svg)

```
[![Health](https://phpackages.com/badges/limanweb-iso-codes/health.svg)](https://phpackages.com/packages/limanweb-iso-codes)
```

###  Alternatives

[rtconner/laravel-likeable

Trait for Laravel Eloquent models to allow easy implementation of a 'like' or 'favorite' or 'remember' feature.

394388.0k5](/packages/rtconner-laravel-likeable)[io238/laravel-iso-countries

Ready-to-use Laravel models and relations for country (ISO 3166), language (ISO 639-1), and currency (ISO 4217) information with multi-language support.

5462.3k](/packages/io238-laravel-iso-countries)[yurtesen/geonames

Geonames importer and models for Eloquent ORM

311.7k](/packages/yurtesen-geonames)[phaza/single-table-inheritance

Single Table Inheritance Trait

1515.8k](/packages/phaza-single-table-inheritance)

PHPackages © 2026

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