sicaboy/ip2country-laravel is a Laravel package for laravel client for ip2country.
It currently has 0 GitHub stars and 9 downloads on Packagist (latest version 0.1).
Install it with composer require sicaboy/ip2country-laravel.
Discover more Laravel packages by sicaboy
or browse all Laravel packages to compare alternatives.
Last updated
Laravel Client for ip2country
You can install the package via composer:
composer require sicaboy/ip2country-laravel
You can publish the config file with:
php artisan vendor:publish --tag="ip2country-laravel-config"
This is the contents of the published config file:
return [
'api_key' => env('IP2COUNTRY_API_KEY'),
'api_url' => env('IP2COUNTRY_API_URL', 'https://ip2country.yourdomain.com'),
];
use Sicaboy\Ip2countryLaravel\Facades\Ip2country;
Ip2countryLaravel::getCountryCode('1.1.1.1');
Ip2countryLaravel::getCountryCode(request()->ip())
You will get the country code of the IP address.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.