mohammadhprp/filament-ip-to-country-flag-column
| Install | |
|---|---|
composer require mohammadhprp/filament-ip-to-country-flag-column |
|
| Latest Version: | v1.0.2 |
| PHP: | ^8.1 |
| License: | MIT |
| Last Updated: | Mar 21, 2025 |
| Links: | GitHub · Packagist |
IP to country flag Column for Filament 🚩
Display country flag from IP address in your Filament tables
Warning This plugin may cause a slight delay in page loading due to API calls to iplocation.
Screenshot

Installation
You can install the package via composer:
composer require mohammadhprp/filament-ip-to-country-flag-column
For Filament v2:
composer require mohammadhprp/filament-ip-to-country-flag-column:"^0.2.0"
Usage
To use the package, follow these steps:
use Mohammadhprp\IPToCountryFlagColumn\Columns\IPToCountryFlagColumn;
IPToCountryFlagColumn::make('client_ip');
Options
-
Flag position: Change the position of the flag using
flagPosition. Available options:rightandleft.IPToCountryFlagColumn::make('client_ip')->flagPosition('left');💡 Note: Default flag position is
right. -
Hide flag: Hide the flag using
hideFlag.IPToCountryFlagColumn::make('client_ip')->hideFlag(); -
Location position: Change the location position using
location(). Available options:belowandabove.IPToCountryFlagColumn::make('client_ip')->location(position: 'above');💡 Note: Default location position is
below. -
Location separator: Change the location separator using
location().IPToCountryFlagColumn::make('client_ip')->location(separator: '-');💡 Note: Default location separator is
,. -
Hide city or country name: Hide city or country name using
hideCity()orhideCountry().IPToCountryFlagColumn::make('client_ip') ->hideCountry() ->hideCity();
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
- Fork the repository.
- Create a new branch for your feature.
- Make your changes and commit them with clear commit messages.
- Submit a pull request to the
masterbranch.
Credits
License
This project is licensed under the MIT License - see the License file for details.