laravel-geo-ip maintained by karjah
Geo IP for Laravel
A lightweight, easy way to get gelocation information from an IP address.
Installation
- Install via composer:
composer require karjah/laravel-geo-ip
Usage
Using the Facade
use Karjah\GeoIP\Facades\GeoIp;
$geoData = GeoIP::get($ipAddress);
// Getting values
$countryCode = $geoData->countryCode;
Available Values
These are the values stored in the GeoIp object.
status // success or fail
country
countryCode
region
city
ip
isp
message // Only if status = fail