micro-module/geotools
Geotools is a Laravel package for geographic data and geospatial helpers. Work with coordinates, distances, proximity calculations, and location formatting through convenient PHP APIs that make adding map-aware features to your application simple.
Architecture fit. Geotools is a stateless utility/abstraction library, not a framework-bound package — no service provider, no config contract, no Eloquent coupling. That makes it a good fit as a domain utility behind your own service layer (app/Services/Geo/*), and a poor fit as a primary spatial engine. Sensible uses: store/dealer locators, delivery-zone polygon containment, reverse-geocoding captured addresses, normalizing address data on import, and pre-filtering candidates by bounding box before a precise distance pass. For high query volume, radius filtering belongs in PostGIS or MySQL 8 spatial indexes, not in a PHP loop.
Integration feasibility. Straightforward but not turnkey. You register a singleton, publish credentials to config, and wrap the whole thing behind a narrow interface so it stays swappable. Estimated effort: 1–3 engineer-days for the wrapper, tests, and a fake geocoder adapter. The bulk of the real work is not integration — it is credential management, caching, and third-party error handling.
Technical risk.
micro-module/geotools while the cited repository is thephpleague/geotools. Verify the actual Composer name is league/geotools. If you would be installing micro-module/geotools, that is a republished fork — a supply-chain review item before it enters composer.json.willdurand/geocoder, PSR-7/18 stack). Pin versions and test against your actual 8.2/8.3 runtime.Key questions. Which geocoder(s), at what per-1k cost and quota? Is haversine error (meters over city-scale distances) acceptable, or is ellipsoidal accuracy required? Is IP-based geolocation in scope — and therefore GDPR/ePrivacy review? Do we store derived lat/lng at write time or recompute per request? If we already run PostGIS, what does this library give us that the database does not? Who owns key rotation and budget alarms?
Stack fit. Laravel 9/10/11 as a plain Composer dependency; nothing to fight. Natural home is a GeoService + queued jobs, with a GeocoderGateway interface in front so the library is never called directly from controllers or models. Note that bundled adapters use their own HTTP stack — Laravel's Http client macros and retry semantics will not apply unless you write the adapter yourself.
Migration path. From ad-hoc haversine SQL or inline Distance Matrix calls: (1) add the dependency plus the wrapper interface, (2) port the cheapest, best-tested path first — distance and bounding box, (3) move geocoding behind the wrapper with cache and circuit breaker, (4) migrate batch/import flows last.
Compatibility. Confirm the PHP constraint against your runtime and check whether anything else in the app already pins willdurand/geocoder — that is the most common conflict in Laravel apps doing address validation. Given the low release cadence, plan on the assumption that you may need a fork or patch if an upstream provider API shifts.
Sequencing.
Maintenance. Low churn, which cuts both ways: a quiet library is cheap to carry but slow to respond to provider API drift or CVEs. Budget one to two days per quarter for dependency bumps and adapter fixes. You own the wrapper, config, and regression fixtures; treat the library as a replaceable leaf, not a foundation.
Support. Community only, no vendor SLA. 1,400 stars is respectable but not a support contract. Escalation path is read the (small) source, patch in a fork, or replace with geocoder-php adapters plus a small math helper. Keeping the interface narrow makes that a one-file change.
Scaling. CPU cost is negligible; the scaling risk is entirely external — provider quotas and per-call pricing. At 10k lookups/day an uncached Google Geocoding integration is a visible line item; at 1M it is an outage. Mitigations: aggressive caching, batch endpoints where offered, persist coordinates at write time rather than recompute at read time, and push radius filtering into the database.
Failure modes.
Ramp-up. A mid-level Laravel developer is productive in half a day — the API surface is small (distance(), geocoder(), batch(), coordinate()). The real learning curve is domain literacy: coordinate systems, haversine-vs-ellipsoid error, geocoder licensing, and cache invalidation. Plan one knowledge-transfer session on those topics and write an ADR recording why this library rather than PostGIS or a provider SDK.
Bottom line. The code is low-risk and inexpensive, and it fits cleanly behind a wrapper. The go/no-go hinges less on the library than on two things: resolving the package-identity discrepancy before it reaches the lock file, and treating geocoding as a metered external dependency with caching, quotas, and fallbacks designed in from day one.
How can I help you explore Laravel packages today?