karjah/laravel-geo-ip

Uses ip-api.com to get geolocation information for IP addresses.

Maintainers

Package info

github.com/karjah/laravel-geo-ip

pkg:composer/karjah/laravel-geo-ip

Statistics

Installs: 1

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-04-22 19:38 UTC

This package is auto-updated.

Last update: 2026-04-22 19:40:04 UTC


README

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