A country code select form field, table column, and table filter for Laravel Filament.
composer require tapp/filament-country-code-field
Add to your Filament resource:
use Tapp\FilamentCountryCodeField\Forms\Components\CountryCodeSelect;Â public static function form(Form $form): Form{ return $form ->schema([ // ... CountryCodeSelect::make('country_code'), // ... ]);}
use Tapp\FilamentCountryCodeField\Tables\Columns\CountryCodeColumn;Â public static function table(Table $table): Table{ return $table ->columns([ //... CountryCodeColumn::make('country_code'), ]) // ...}
use Tapp\FilamentCountryCodeField\Tables\Filters\CountryCodeFilter;Â public static function table(Table $table): Table{ return $table //... ->filters([ CountryCodeFilter::make('country_code'), // ... ])}