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

Geocode Laravel Package

jcf/geocode

Laravel package that automatically geocodes Eloquent models. Add a trait, define address fields, and jcf/geocode resolves latitude and longitude via Google Maps on save, with caching and configurable API credentials for location-aware apps and maps.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Address capture and normalization in onboarding/checkout. Turning free-text addresses into lat/lng plus structured components (street, city, postal code, country) is the gating capability for delivery eligibility, tax jurisdiction, and service-area checks. This package is the smallest possible implementation of that capability in a Laravel codebase — a config-driven service binding over Google's Geocoding API.
  • Proximity and "near me" features. Store locators, service-area lookups, and radius filtering all need a coordinate pair. If the roadmap has any form of "find the nearest X," a geocoding dependency is on the critical path; this package answers whether you build that plumbing or buy it.
  • Build vs. buy on integration glue, not on geocoding. The underlying capability is a commodity API call. The real decision here is whether a ~48-star, single-maintainer wrapper is cheaper than a 100-line internal service class. It usually is on day one and usually isn't by year two — which is a decision worth making explicitly rather than by default.
  • Vendor concentration risk as a roadmap item. Google Geocoding carries per-request pricing that has changed repeatedly, and terms that constrain how you may cache and display results. Adopting this package is a de facto commitment to Google as the geocoding vendor for that surface area; that belongs in the platform/risk conversation, not buried in a sprint.
  • Data-handling posture. Every call ships a customer address — PII — to a third party. That's a GDPR/DPA and vendor-register question that a PM should raise before, not after, the feature ships.
  • Use cases it unlocks cheaply: delivery-zone validation, address autocomplete on forms, CRM/lead enrichment with region and timezone, fraud signals (billing address vs. IP geolocation), and map rendering for internal ops dashboards.

When to Consider This Package

Reasonable fit when:

  • You're already on Google Cloud with a billing account and a Maps Platform contract; the incremental procurement cost is zero.
  • The need is one or two call sites — a store locator, a checkout validator — not a platform-wide geocoding service.
  • The team is Laravel-native and values a config-published provider binding over hand-rolled HTTP client code, and is comfortable vendoring/forking an MIT-licensed dependency if the maintainer disappears.
  • You're prototyping and want a geocoder bound in an afternoon, with the expectation that the integration point will be wrapped behind your own interface before it reaches production.

Look elsewhere when:

  • You need provider portability. With 48 stars, zero dependents, and a single-maintainer profile, this is a thin convenience wrapper, not an abstraction. Any serious multi-provider requirement (Google today, Mapbox or Amazon Location or a self-hosted Nominatim tomorrow) belongs in geocoder-php/GeocoderLaravel or your own adapter, not here.
  • Durability matters more than speed. Zero dependents means no one else is stress-testing upgrades against it. Every Laravel major bump is a "does this still work" question you own alone. For a revenue-critical path, that maintenance burden likely exceeds writing the wrapper yourself.
  • You need more than forward/reverse geocoding. Address autocomplete, place details, timezone lookup, and batch geocoding are adjacent Google APIs. Confirm this package covers them — a narrow wrapper becomes a fork the moment you need one more endpoint.
  • Caching-and-storage compliance is unresolved. Google's terms restrict persisting and re-displaying results outside their maps. If your product plan requires storing coordinates indefinitely and rendering them on a non-Google map, resolve that legally before choosing any Google-backed wrapper.
  • Cost sensitivity is high. At volume, per-request pricing dominates; the wrapper's license cost (MIT, free) is irrelevant next to API spend. The decision is about the vendor, not the package.

How to Pitch It (Stakeholders)

To executives: This is a free, MIT-licensed convenience layer that lets our Laravel app call Google's geocoding service with a few lines of configuration instead of custom integration code. It saves an engineer roughly a day on the first feature and nothing thereafter. The decision that actually matters isn't the package — it's committing that surface of the product to Google as our geocoding vendor, which carries per-request costs that scale with usage and contractual limits on how long we may store results. Recommend adopting it for a bounded, low-volume feature (store locator or delivery-address validation), wrapped behind our own internal interface so the vendor is swappable.

To engineering: Small, single-maintainer wrapper, 48 stars, no dependents, MIT. Treat it as a convenience, not infrastructure. Bind it behind an internal Geocoder contract with our own DTOs so swapping to Mapbox, Amazon Location, or a self-hosted Nominatim is a config change rather than a refactor. Assume we may need to fork it on the next Laravel major; the code surface is small enough that this is acceptable. Budget explicitly for caching — dedupe repeated lookups and validate before geocoding — since API spend, not the package, is the real cost driver. Get a DPA in place for the address data leaving our boundary, and confirm with legal whether we may persist coordinates beyond the request.

Bottom line: Low-cost, low-risk-to-try, moderate-risk-to-depend-on. Adopt narrowly, abstract the boundary, and keep the vendor decision separate from the package decision.

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.
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator
equipc/laravel-email-database-log
adedsec/nova-translated-labels
wazza/laravel-db-encryption
hokny/laravel-generator
vonsogt/backup
jengo/queues
jeremykenedy/laravel-observability
coleus/frame
thtg88/journalism
filagora/filagora-ai-forums