Looking to hire Laravel developers? Try LaraJobs

laravel-geo-ip maintained by karjah

Description
Uses ip-api.com to get geolocation information for IP addresses.
Author
Last update
2026/04/22 21:38 (dev-main)
License
Downloads
1

Comments
comments powered by Disqus

Geo IP for Laravel

A lightweight, easy way to get gelocation information from an IP address.

Installation

  1. 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