Skip to main content

"Black Friday" Discount! Only until December 1st: 50% off all membership plans!

Read more here
Back to packages
185 GitHub stars

devrabiul/laravel-geo-genius

View on GitHub

Description

IP-based geolocation, timezone, multilingual toolkit + country picker & phone validation for Laravel apps

Use Laravel GeoGenius in two ways:

  1. ✅ Global Helper — laravelGeoGenius() (recommended)
  2. 🧰 Service Class — manually instantiate GeoLocationService

Global Helper

laravelGeoGenius()->geo()->locateVisitor();
laravelGeoGenius()->geo()->getCountry();
laravelGeoGenius()->geo()->getTimezone();
laravelGeoGenius()->geo()->getLatitude();

Service Class

use Devrabiul\LaravelGeoGenius\Services\GeoLocationService;
 
$geo = new GeoLocationService();
 
$ip = $geo->getClientIp();
$locationData = $geo->locateVisitor();

Recent Courses on Laravel Daily