Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Geo Genius

Laravel Geo Genius Laravel Package

devrabiul/laravel-geo-genius

Laravel GeoGenius is a lightweight toolkit for IP geolocation, automatic timezone detection and conversion, locale and multilingual support, plus a country picker with phone formatting and validation. Works via cookies or headers and fully supports Livewire.

View on GitHub
Deep Wiki
Context7

Laravel GeoGenius is a lightweight, global-ready toolkit for Laravel applications. It detects user location via IP geolocation, resolves the correct timezone through cookies, headers, or fallback strategies, and automatically sets the matching locale — so your app feels native from the first request. Fully compatible with Livewire, it also ships a complete phone input experience with country picker, formatting, and validation.

  • 🌐 IP Geolocation — retrieve detailed location data instantly
  • 🕒 Timezone Helpers — detect and convert timestamps automatically
  • 🏷️ Multilingual Support — auto-detect locale, translate, convert numbers
  • 📱 Country Picker & Phone Validation — sensible defaults, auto-formatting
Frequently asked questions about Laravel Geo Genius
How do I install Laravel GeoGenius in a Laravel application?
Install it with Composer using composer require devrabiul/laravel-geo-genius, then publish the package assets with the vendor:publish command. There is no compilation step and no frontend framework requirement, so a working spike usually takes hours rather than days. The package resolves through Laravel's service container and exposes a global laravelGeoGenius() helper for geo(), language(), and timezone access.
Is Laravel GeoGenius compatible with Livewire components?
Yes, Livewire compatibility is an advertised feature, and it is plausible given the session-first resolution strategy introduced in version 1.6. The package resolves geo and locale data via cookies or request headers, which survives Livewire's subsequent AJAX requests. If you rely on headers alone, confirm the values persist across Livewire round trips in your own app before shipping.
Which Laravel and PHP versions does Laravel GeoGenius officially support?
The README does not publish a tested support matrix, so treat Laravel 10, 11, 12 and PHP 8.2+ support as unconfirmed until you ask the maintainer or run your own smoke tests. The package is a service-layer plus helper design with no schema requirement beyond an optional timezone column, so conflicts are more likely to come from HTTP client or session handling than from framework internals. Pin a version and verify on your target stack before committing.
Does Laravel GeoGenius detect the real client IP behind a load balancer or Cloudflare?
There is no documented trusted-proxy or X-Forwarded-For handling, so behind an ALB or Cloudflare you may end up geolocating the load balancer instead of the user. That failure is silent rather than loud, which makes it easy to miss in staging. If your edge already exposes geo-IP signals such as CF-IPCountry or Fastly geo headers, prefer those over an extra HTTP hop.
What happens when the IP geolocation API is unavailable in Laravel GeoGenius?
The package depends on the free tiers of ipwho.is and ip-api.com, which carry no SLA, no contract, and no paid escalation path, so outages and rate limits are realistic. Note that ip-api.com's free tier is HTTP-only, which will trigger mixed-content blocking on HTTPS applications. Fallback behavior on API failure is not documented, so ask the maintainer whether it degrades to a default country and timezone or throws.
Is Laravel GeoGenius safe to use under GDPR for user location data?
The package sends raw end-user IP addresses to a third-party geolocation service and caches results for seven days per IP, which is personal data under GDPR. That requires a data processing agreement review or a self-hosted alternative such as MaxMind GeoLite2. If your privacy posture forbids third-party IP sharing, plan for a local database fallback before rollout.
Does the Laravel GeoGenius country picker load remote assets that break my Content-Security-Policy?
Yes, the phone input feature injects intl-tel-input JavaScript and CSS from jsDelivr, which will fail under a strict CSP and will draw supply-chain questions during security review. The simplest fix is to drop that feature entirely and consume intl-tel-input directly with your own bundling and SRI hashes. The geo, timezone, and locale helpers do not depend on the phone input, so scoping it out costs you little.
Is there a test suite and CI pipeline for Laravel GeoGenius?
The README and release notes surface no CI status badge, and the contributing guide only says to add tests if applicable, which reads more aspirational than enforced. Coverage of the fallback paths in particular is unknown. In practice you should assume you are the de facto QA and write your own feature tests around the service container and session writes.
Can I swap the geolocation driver in Laravel GeoGenius for MaxMind or a paid API?
A driver-swap interface is not documented, and the HTTP client appears hard-wired to the bundled providers. The pragmatic approach is to wrap the helper behind your own small GeoContext interface that exposes country, timezone, locale, source, and resolved-at, and put a GeoGenius adapter behind it. That gives you a one-file swap to MaxMind, Cloudflare, or a paid ip-api plan later, and it also contains the package's genius_local_Language session key typo.
Is Laravel GeoGenius actively maintained, and what should I use instead?
It is a single-maintainer package with around 183 GitHub stars, zero dependents, and a composite score of 12.3, so there is no downstream pressure to fix bugs you report. Alternatives include Cloudflare CF-IPCountry, Fastly geo headers, MaxMind GeoIP2, or calling ipwho.is and ip-api.com directly behind your own abstraction. Because it bundles geolocation, timezone conversion, locale negotiation, a CDN-loaded phone input, and an artisan machine-translation pipeline, consider adopting only the geo and timezone slice and declining the translation commands in your first release.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console
pnscripts/filament-broadquill-lite
pnscripts/laravel-sentfold-lite
vleap/mx-sdk-laravel-internal
twidpay/utils
htetmyathlaing/scout-elasticsearch-driver
artisan-toolbox/front-awesome
ls/client-assistant
users-au/laravel-client
cgv/localized-resource
noith/settings
kda/laravel-package
kda/filament-dynamic-navigation
bypersoft/signbox
pairus/product-data
fayne/laravel-filament-cms-core
nodisrupt/laravel-agent
sierratecnologia/media-manager