Laravel Client for echoip
You can install the package via composer:
composer require sicaboy/echoip-laravelYou can publish the config file with:
php artisan vendor:publish --tag="echoip-laravel-config"This is the contents of the published config file:
return [
'api_key' => env('ECHOIP_API_KEY'),
'api_url' => env('ECHOIP_API_URL', 'https://echoip.yourdomain.com'),
];use Sicaboy\EchoipLaravel\Facades\Echoip;
EchoipLaravel::getInfo('1.1.1.1');
EchoipLaravel::getInfo(request()->ip())You will get the country code of the IP address.
composer testPlease 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.