PHPackages                             parfaitementweb/filament-country-field - 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. parfaitementweb/filament-country-field

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

parfaitementweb/filament-country-field
======================================

Country dropdown with ISO 3166 options values

2.5.5(3mo ago)19155.0k↓20.8%16[1 PRs](https://github.com/parfaitementweb/filament-country-field/pulls)1MITPHPPHP ^8.1CI passing

Since Jan 16Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/parfaitementweb/filament-country-field)[ Packagist](https://packagist.org/packages/parfaitementweb/filament-country-field)[ Docs](https://github.com/parfaitementweb/filament-country-field)[ GitHub Sponsors](https://github.com/parfaitementweb)[ RSS](/packages/parfaitementweb-filament-country-field/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (8)Versions (19)Used By (1)

Filament Country (ISO 639-1) Field
==================================

[](#filament-country-iso-639-1-field)

[![Latest Version on Packagist](https://camo.githubusercontent.com/47f6a930c0135d916eb5281054af2170bf3eeacaf124ec52f0fd99aabb3ff9c5/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f70617266616974656d656e747765622f66696c616d656e742d636f756e7472792d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/parfaitementweb/filament-country-field)[![GitHub Tests Action Status](https://camo.githubusercontent.com/914696c956ab8805fee284a2570047c61661d54a4bf57eb6b48192a484d52c83/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70617266616974656d656e747765622f66696c616d656e742d636f756e7472792d6669656c642f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/parfaitementweb/filament-country-field/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a0302986af7de95a5d6daf199a83bc6ce1a1d392692849e54b1a829735380c01/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f70617266616974656d656e747765622f66696c616d656e742d636f756e7472792d6669656c642f6669782d7068702d636f64652d7374796c696e672e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/parfaitementweb/filament-country-field/actions?query=workflow%3A%22Fix+PHP+code+styling%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/3223ef276f026472ba204ea0e7491c9a8b1c8fbc6ea79d5e09d357f1022f5491/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f70617266616974656d656e747765622f66696c616d656e742d636f756e7472792d6669656c642e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/parfaitementweb/filament-country-field)[![Filament Version](https://camo.githubusercontent.com/3f68a21e244284bc9d62b6326e490df3320cf28acdb41d4fbf288f0ca350191c/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f46696c616d656e742d76342d626c7565)](https://filamentphp.com)

The simplest way to list every country as a selectable dropdown 🤘

Features
--------

[](#features)

- Display a select field with **every ISO 639-1 language**. *tl;dr: The two-letter code.*
- Built-in **localization** in **132** languages.
- Supports all the native **[Select Field](https://filamentphp.com/docs/3.x/forms/fields/select)** features.

Screenshot
----------

[](#screenshot)

[![filament-country-field](https://private-user-images.githubusercontent.com/287688/298268185-ba6e568c-3244-4338-a6ca-89fce52a5f06.jpg?jwt=eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3NzQzNDkwMzAsIm5iZiI6MTc3NDM0ODczMCwicGF0aCI6Ii8yODc2ODgvMjk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U3YzAwMTZmNWNiNDA1MzQ2Y2JhMjZhYTAyNzIyZmRiMjQxM2JiMDk5NGRkODc5JlgtQW16LVNpZ25lZEhlYWRlcnM9aG9zdCJ9.b74k7TdzJuQdKCxjjHr_Js3bZJLHANYIgwW_mUjfXQM)

Getting Started
---------------

[](#getting-started)

We have made things easy for you start. Here is the three steps your need to follow:

1. **Install the package**

```
composer require parfaitementweb/filament-country-field
```

2. **Add the Country Form field in your Filament Resource.**

```
use Parfaitementweb\FilamentCountryField\Forms\Components\Country;

Country::make('country')
```

3. **Add the Country Column field in your Filament Resource.**

```
use Parfaitementweb\FilamentCountryField\Tables\Columns\CountryColumn;

CountryColumn::make('country')
```

3. **Enjoy.**

Configuration
-------------

[](#configuration)

On top of all **[Select Field](https://filamentphp.com/docs/3.x/forms/fields/select)** methods, you can use these four helpers for the Form Component.

- `only()` restricts the list of countries.
- `exclude()` removes an item from the list.
- `add()` adds your own value to the list.
- `map()` changes one key to another, such as `GB` to `UK`.

```
use Parfaitementweb\FilamentCountryField\Forms\Components\Country;

Country::make('country')
->only(['GB', 'GF', 'NL'])
->exclude(['NL'])
->add(['MA' =>'Mars'])
->map(['GB' => 'UK', 'GF' => 'FR'])
```

Clearing the Cache
------------------

[](#clearing-the-cache)

To ensure better performance and faster response times, the country list is stored in the cache for easy retrieval, leading to an overall snappier user experience.

To clear the cached country list, you can utilize the built-in artisan command provided by Laravel. The following command can be run in your terminal or command line interface:

```
php artisan countries-field:clear
```

Built-in translations
---------------------

[](#built-in-translations)

The country values are displayed according to the user's current locale settings, which are determined by the App::getLocale() value.

The field supports those **132 languages**:

*Afrikaans, Akan, Amharic, Arabic, Assamese, Azerbaijani, Belarusian, Bulgarian, Bambara, Bengali, Tibetan, Breton, Bosnian, Catalan, Chechen, Czech, Welsh, Danish, German, Dzongkha, Ewe, Greek, English, Esperanto, Spanish, Estonian, Basque, Persian, Fula, Finnish, Faroese, French, Western Frisian, Irish, Scottish Gaelic, Galician, Gujarati, Manx, Hausa, Hebrew, Hindi, Croatian, Hungarian, Armenian, Interlingua, Indonesian, Igbo, Sichuan Yi, Icelandic, Italian, Japanese, Javanese, Georgian, Kikuyu, Kazakh, Kalaallisut, Khmer, Kannada, Korean, Kashmiri, Kurdish, Cornish, Kyrgyz, Luxembourgish, Ganda, Lingala, Lao, Lithuanian, Luba-Katanga, Latvian, Malagasy, Maori, Macedonian, Malayalam, Mongolian, Marathi, Malay, Maltese, Burmese, Norwegian Bokmål, North Ndebele, Nepali, Dutch, Norwegian Nynorsk, Norwegian, Oromo, Odia, Ossetic, Punjabi, Polish, Pashto, Portuguese, Quechua, Romansh, Rundi, Romanian, Russian, Kinyarwanda, Sindhi, Northern Sami, Sango, Serbo-Croatian, Sinhala, Slovak, Slovenian, Shona, Somali, Albanian, Serbian, Swedish, Swahili, Tamil, Telugu, Tajik, Thai, Tigrinya, Turkmen, Tagalog, Tongan, Turkish, Tatar, Uighur, Ukrainian, Urdu, Uzbek, Vietnamese, Wolof, Xhosa, Yiddish, Yoruba, Chinese, Zulu*

Built-in countries
------------------

[](#built-in-countries)

You can check the entire [country list here](DATA.md).

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

This package used data from [umpirsky/country-list](https://github.com/umpirsky/country-list). Thank you for the great work.

- [Alexis](https://github.com/AlexisSerneels)
- [Saša Stamenković](https://github.com/umpirsky)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

56

—

FairBetter than 98% of packages

Maintenance84

Actively maintained with recent releases

Popularity46

Moderate usage in the ecosystem

Community22

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 80.8% 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 ~52 days

Recently: every ~35 days

Total

15

Last Release

113d ago

Major Versions

1.0.0 → 2.0.02024-01-16

PHP version history (2 changes)1.0.0PHP ^8.1

2.0.1PHP ^8.1 || ^8.2 || ^8.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/67c747d82e5989eeae3f98ae775f6e9d9aaee286e221e9f35a446e0f440421a8?d=identicon)[parfaitementweb](/maintainers/parfaitementweb)

---

Top Contributors

[![AlexisSerneels](https://avatars.githubusercontent.com/u/287688?v=4)](https://github.com/AlexisSerneels "AlexisSerneels (122 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (14 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (8 commits)")[![MrSentex](https://avatars.githubusercontent.com/u/42656815?v=4)](https://github.com/MrSentex "MrSentex (2 commits)")[![agencetwogether](https://avatars.githubusercontent.com/u/53862310?v=4)](https://github.com/agencetwogether "agencetwogether (1 commits)")[![pierredup](https://avatars.githubusercontent.com/u/144858?v=4)](https://github.com/pierredup "pierredup (1 commits)")[![charlielangridge](https://avatars.githubusercontent.com/u/8578083?v=4)](https://github.com/charlielangridge "charlielangridge (1 commits)")[![Devonab](https://avatars.githubusercontent.com/u/6360488?v=4)](https://github.com/Devonab "Devonab (1 commits)")[![felipefcastro-okay](https://avatars.githubusercontent.com/u/23668256?v=4)](https://github.com/felipefcastro-okay "felipefcastro-okay (1 commits)")

---

Tags

laravelParfaitementwebfilament-country-field

###  Code Quality

TestsPest

Static AnalysisPHPStan

### Embed Badge

![Health badge](/badges/parfaitementweb-filament-country-field/health.svg)

```
[![Health](https://phpackages.com/badges/parfaitementweb-filament-country-field/health.svg)](https://phpackages.com/packages/parfaitementweb-filament-country-field)
```

###  Alternatives

[guava/calendar

Adds support for vkurko/calendar to Filament PHP.

298241.0k3](/packages/guava-calendar)[pboivin/filament-peek

Full-screen page preview modal for Filament

253319.6k12](/packages/pboivin-filament-peek)[dotswan/filament-map-picker

Easily pick and retrieve geo-coordinates using a map-based interface in your Filament applications.

124139.3k2](/packages/dotswan-filament-map-picker)[creagia/filament-code-field

A Filamentphp input field to edit or view code data.

58289.3k3](/packages/creagia-filament-code-field)[swisnl/filament-backgrounds

Beautiful backgrounds for Filament auth pages

54149.2k6](/packages/swisnl-filament-backgrounds)[hydrat/filament-table-layout-toggle

Filament plugin adding a toggle button to tables, allowing user to switch between Grid and Table layouts.

6292.3k1](/packages/hydrat-filament-table-layout-toggle)

PHPackages © 2026

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