toin0u/geocoder-laravel
Geocoder for Laravel integrates the Geocoder PHP library into Laravel apps, enabling address geocoding and reverse geocoding with configurable providers and caching. Requires PHP 8.2+ and Laravel 11+, with service provider auto-discovery for quick setup.
geocoder-php/Geocoder library in a Laravel service provider, so the decision becomes "which provider do we pay for?" rather than "how many sprints to build geocoding?"Chain provider plus per-provider aliasing (->using('google_maps')) means the domain code never names a vendor. That is a negotiating asset: GoogleMaps, Nominatim, GeoPlugin, Mapbox, and others are swappable at the config layer, and a failing primary falls through to a secondary without an incident.locale('it') and locale('fr') don't collide, and doNotCache() for query-level bypass. The adapter config (timeout, connectTimeout, retry) gives you knobs to trade latency against third-party flakiness without a release.cache.serializable_classes to keep caching working under Laravel's new hardening default. The PM choice is explicit — accept the narrowly scoped relaxation, maintain your own allow-list, or disable geocoder caching. Related due diligence: confirm your chosen provider's terms permit storing results for the cache duration you configure (some providers restrict long-lived caching of geocoded output).locale() support with isolated cache entries lowers the marginal cost of shipping in additional markets, which changes sequencing decisions for i18n roadmaps.Adopt when most of these are true:
LaravelHttpClient delegates to Laravel's Http facade, so Http::fake() and Http::assertSent() work with zero setup, and existing retry/timeout/middleware config applies.Look elsewhere, or supplement, when:
For executives: This is a low-cost, low-risk shortcut to a set of location-dependent features — locators, address handling, IP-based regional routing — that would otherwise consume engineering sprints. It's MIT-licensed, installs as a single Composer package, and introduces no new vendor contract. The provider-abstraction layer is the strategic part: it keeps us from being locked into one geocoding vendor and gives us fallback if a provider degrades, while built-in caching directly controls the per-lookup API bill. Cost is engineering time plus whatever provider usage we choose; the package itself is free.
For engineering: Laravel-native integration — service provider, Geocoder facade, publishable config, DI-friendly aggregator. The default HTTP adapter routes through Laravel's Http facade, so Http::fake() works in tests out of the box and existing retry/timeout/middleware applies; any PSR-18 client can be swapped in. Providers compose via Chain for automatic fallback, and locale-aware caching keeps results correct across markets. Requirements are modern (PHP 8.2+, Laravel 11+), and releases track Laravel majors, so upgrade planning is predictable.
Risks to state plainly: thin adoption signal (754 stars, zero reported dependents) and a small maintainer pool — pin the version and budget for the possibility of forking. The Laravel 13 cache allow-list auto-registration is a deliberate, bounded relaxation of a security default; have someone review it and decide between auto-registration, a hand-managed allow-list, or doNotCache(). And confirm the chosen provider's terms permit the cache duration you set before committing to an "effectively forever" default.
How can I help you explore Laravel packages today?