karjah / laravel-geo-ip
Uses ip-api.com to get geolocation information for IP addresses.
v1.0.0
2026-04-22 19:38 UTC
Requires
- php: ^8.4
- laravel/framework: ^12.0|^13.0
README
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