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.

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"
To use the package, follow these steps:
use Mohammadhprp\IPToCountryFlagColumn\Columns\IPToCountryFlagColumn;Â IPToCountryFlagColumn::make('client_ip');
Flag position: Change the position of the flag using flagPosition. Available options: right and left.
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: below and above.
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() or hideCountry().
IPToCountryFlagColumn::make('client_ip') ->hideCountry() ->hideCity();
Please see CHANGELOG for more information on what has changed recently.
master branch.This project is licensed under the MIT License - see the License file for details.