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

Geolocation For Laravel Laravel Package

roundly-consulting/geolocation-for-laravel

A Laravel package for adding geolocation and location-aware features to your app. Resolve coordinates, calculate distances, and build proximity-based queries and search results with a simple, framework-friendly API.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Geo-aware product features. The package's observable surface (UpdateDatabaseAction, MaxMind download staging, a rate-limited HTTP client) indicates it owns the local GeoIP database lifecycle — fetching, staging, and refreshing MaxMind data for IP-to-location lookups. That underwrites decisions on: locale/currency/unit defaults, regional content licensing and blackout rules, tax and regulatory routing, shipping/eligibility rules, fraud and risk scoring inputs, and geo-segmented analytics.
  • Build vs. buy for geolocation. The real decision is rarely "build an IP geolocation database" — it is "self-hosted GeoLite2 vs. a managed lookup API." This package makes the self-hosted option cheap to adopt inside Laravel, so the comparison becomes licensing and operational ownership versus per-lookup vendor spend and SLA.
  • Data freshness as a product commitment. Because the database is downloaded and refreshed on a schedule, "how stale can a location answer be?" becomes an explicit, ownable product parameter (update cadence, failure alerting, fallback behaviour) rather than an invisible vendor detail.
  • Vendor and licence risk on the roadmap. MaxMind GeoLite2 carries attribution and redistribution terms and requires an account/licence key. Any roadmap item depending on geo data inherits that dependency, so it belongs in the risk register, not just the backlog.
  • Ecosystem coupling. 2.0.4 pins enums ^1.1.0, http-client-rate-limits ^1.1.0, package-toolkit ^1.3.0, and testing ^1.2.1. This package is one node in a first-party suite, so adopting it means adopting an upgrade cadence across several packages — a real cost to price into a build-vs-buy call.
  • Testability as a delivery lever. The refactor letting tests choose the MaxMind staging directory means geo-dependent features can be tested without touching host temp paths. That shortens feedback loops on any feature whose behaviour varies by location — a genuine velocity argument, not a cosmetic one.

When to Consider This Package

Consider it when:

  • You are on a supported Laravel/PHP version and want IP geolocation resolved inside your own infrastructure, with no per-lookup network call on the request path.
  • You already hold (or are willing to hold) a MaxMind account and licence key, and can accept GeoLite2's accuracy and attribution obligations.
  • You can schedule a recurring job and own the surrounding operations: update cadence, failure alerting, and a defined fallback when the database is missing or stale.
  • Your consumers are a first-party Laravel suite — the pinned Roundly dependencies suggest the package is designed to move in lockstep with siblings, which is an advantage if you are already in that ecosystem and friction if you are not.
  • Your accuracy needs are coarse — country, region, approximate city — for personalisation, compliance routing, or analytics segmentation.

Look elsewhere when:

  • You need contractual accuracy or uptime guarantees, or street-level/ISP-level precision. Use a commercial MaxMind web service or a specialist provider with an SLA instead of self-hosting GeoLite2.
  • You want zero operational ownership — no cron, no disk staging, no licence rotation. A managed API is the lower-total-cost answer at low-to-moderate volume.
  • You are not on Laravel, or you are on a Laravel/PHP version outside the package's support matrix; the Laravel-native ergonomics are most of the value.
  • You need geolocation synchronously during a request with per-call freshness, where a scheduled local database is the wrong shape.
  • You are outside the Roundly ecosystem and unwilling to inherit three to four transitive first-party constraints for a single capability.
  • You require anonymised or non-persisted IP handling that a downloaded-database model does not by itself satisfy — that is an application-layer design problem this package does not solve.

On 2.0.4 specifically: this is a maintenance patch with no behaviour change. The dependency floors moved and UpdateDatabaseAction gained test-controlled staging, but hosts still relocate the staging area via TMPDIR or the sys_temp_dir ini setting. Nothing here changes the adoption calculus — no breaking changes, no deprecations, no new capability. Treat it as evidence of active maintenance rather than as a reason to decide.

How to Pitch It (Stakeholders)

For executives. This is a small, low-cost component that lets our Laravel applications answer "where is this user?" from a database we host ourselves, instead of paying per lookup to a vendor. It supports regional personalisation, licensing and tax rules, and fraud signals. The trade is straightforward: we take on a scheduled refresh job and a MaxMind licence obligation in exchange for near-zero marginal cost per lookup and no third-party call in the user's request path. Version 2.0.4 is routine maintenance — dependency updates and an internal testability improvement — with no behaviour change and no migration work for us. I would treat adoption as a low-risk, reversible decision, with the one caveat that location accuracy is coarse and we should not build anything revenue-critical on street-level precision.

For engineering. The package manages the GeoLite2 database lifecycle — download, staging, refresh — behind a Laravel-native action, and pulls in Roundly's enums, rate-limited HTTP client, and tooling packages. It is designed to live in a first-party suite, so expect to upgrade it in step with its siblings rather than independently; pin and review the transitive set. 2.0.4 is safe to take: it raises the floors on enums, http-client-rate-limits, package-toolkit (dev: testing) and makes the MaxMind staging directory injectable for tests while keeping host behaviour identical under TMPDIR and sys_temp_dir. Before we commit, we owe ourselves three things: a scheduled update job with alerting on stale or failed downloads, a documented fallback for unknown IPs, and a review of GeoLite2 attribution and redistribution obligations. If those three are cheap for us, this is the right tool; if any of them is expensive, a managed lookup API is the better answer and we should say so early.

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.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console