PHPackages                             witness-data/filament-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. witness-data/filament-country

ActiveLibrary

witness-data/filament-country
=============================

A feature rich country select field, including flags, based on ISO 3166-1.

00PHP

Since Aug 24Pushed todayCompare

[ Source](https://github.com/witness-data/filament-country)[ Packagist](https://packagist.org/packages/witness-data/filament-country)[ RSS](/packages/witness-data-filament-country/feed)WikiDiscussions main Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

FilamentCountry
===============

[](#filamentcountry)

FilamentCountry provides a CountrySelect component, for use in forms.

This plugin provides a searchable select field that displays country flags and names. The selected country is stored using the ISO 3166-1 alpha-2 code.

[![Screenshot](docs/screenshot.png)](docs/screenshot.png)

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

[](#installation)

First require the library.

```
composer require witness-data/filament-country

```

Then update your dependencies.

```
composer update

```

Usage
-----

[](#usage)

### Prepare model:

[](#prepare-model)

First prepare your Eloquent model by casting the country field(s).

```
use WitnessData\FilamentCountry\Country;

protected $casts = [
    'birth_country' => Country::class,
];
```

### Form schema:

[](#form-schema)

You may use the CountrySelect field in your form's schema the same as any other Filament field.

```
use WitnessData\FilamentCountry\CountrySelect;

$schema->components([
    CountrySelect::make('birth_country'),
])
```

You can turn off the flag emojis to display just the country names.

```
use WitnessData\FilamentCountry\CountrySelect;

$schema->components([
    CountrySelect::make('birth_country')
        ->displayFlagEmojis(false),
])
```

The CountrySelect can be modified using any of the functions used to customize a standard Filament Select. You can inject classes as normal.

```
use WitnessData\FilamentCountry\CountrySelect;

CountrySelect::make('birth_country')
    ->searchable(false)
    ->label(fn (?Model $record): string => $record->first_name . '\'s country of birth'),
```

### Infolist schema:

[](#infolist-schema)

You may use a standard TextEntry to display country data in your infolist, assuming it is cast properly in your model.

```
$schema->components([
    TextEntry::make('birth_country')
])
```

###  Health Score

20

—

LowBetter than 12% of packages

Maintenance65

Regular maintenance activity

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity11

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/320582348?v=4)[witness-data](/maintainers/witness-data)[@witness-data](https://github.com/witness-data)

---

Top Contributors

[![witness-data](https://avatars.githubusercontent.com/u/320582348?v=4)](https://github.com/witness-data "witness-data (6 commits)")

### Embed Badge

![Health badge](/badges/witness-data-filament-country/health.svg)

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

PHPackages © 2026

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