LaravelPackages.net
Acme Inc.
Toggle sidebar
sicaboy/ip2country-laravel

Laravel Client for ip2country

9
0
0.1
About sicaboy/ip2country-laravel

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

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Laravel Client for ip2country

Installation

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'),
];

Usage

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.

Testing

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Credits

License

The MIT License (MIT). Please see License File for more information.

Comments