Skip to content

Laravel Client for ip2country

License

GPL-3.0, MIT licenses found

Licenses found

GPL-3.0
LICENSE
MIT
LICENSE.md
Notifications You must be signed in to change notification settings

sicaboy/ip2country-laravel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.

About

Laravel Client for ip2country

Resources

License

GPL-3.0, MIT licenses found

Licenses found

GPL-3.0
LICENSE
MIT
LICENSE.md

Stars

Watchers

Forks

Packages

No packages published

Languages