visiosoft/location-module
Laravel location module for managing countries, regions, and cities in Visiosoft applications. Provides geographic models and migration-ready structures for adding hierarchical location data and selectors, helping organize and reference location records across your project.
What this package actually is. visiosoft/location-module is not a general-purpose Laravel geolocation library. It is a module for the Streams Platform (visiosoft/streams-platform), the entity/CMS framework underpinning OpenClassify — itself a derivative of the PyroCMS/Streams lineage. It supplies the geographic hierarchy used by classified-ad listings (country → region/state → city → district/neighborhood), implemented as Streams streams, fields, assignments, and seed data rather than as conventional Eloquent models with standard migrations. The practical implication: the value is ~90% the geo dataset and schema shape, ~10% the PHP code.
Architecture fit. Fit is binary, not a spectrum:
| Host stack | Fit | Notes |
|---|---|---|
| OpenClassify / Streams Platform | Native | Drop-in; entity definitions resolve against existing stream repository |
| Other Streams-based apps | Good | Assumes compatible Streams major version |
| Vanilla Laravel 9–11 | Poor | Requires Streams as a transitive platform dependency; entity access is via Streams/Entry repositories, not Eloquent relations |
| Symfony / non-PHP | None | Data extraction only |
For a standard Laravel product, adopting this means adopting a second entity framework alongside (or replacing) Eloquent for one domain — a disproportionate architectural tax for a lookup table set.
Integration feasibility. Low effort inside the ecosystem, high effort outside it. Outside, the realistic path is a 1–3 day data-extraction spike: pull the geo rows out of the seeders/migrations, normalize into two or three plain tables, and discard the Streams wiring. That is achievable and is the only version of this package I would recommend consuming.
Technical risk. Material:
Key questions to resolve before commitment.
Stack fit. Assume a conventional Laravel application (Eloquent, MySQL 8/MariaDB, PHP 8.1+). This package does not fit as a dependency. It fits as a reference implementation and data source. Frame the decision as build-vs-adopt where "adopt" means fork-and-extract, not composer require.
Migration path. Three options, ranked:
countries, regions, cities, districts tables with your own indexes. Cost: 2–5 engineer-days. Benefit: no Streams dependency, full control of schema, indexes, and refresh process.Compatibility checklist. Pin PHP and Laravel versions in a throwaway branch; confirm DB JSON column support; ensure utf8mb4 collation for localized place names; verify the package's service provider registers cleanly under Laravel's package discovery or requires manual registration in config/app.php; confirm no global helpers or facades collide with your application. Treat any Streams facade dependency in your own code as a hard stop.
Sequencing.
Do not sequence this as "install package, then adapt the app around it." That inverts the cost model.
Maintenance. Ownership transfers to you on day one. Budget an ongoing ~1 day/quarter for geo data refresh plus ad-hoc time when upstream or Streams moves. If you take option 2, add a monthly dependency-vet task because there will be no upstream release notes to read. Vendor-patch discipline (never edit vendored code in place) must be explicit or the fork will rot.
Support. No community, no dependents, no issue backlog — meaning no crowd-sourced answers when something breaks. Escalation is internal or the vendor directly. Name a single accountable owner for the geographic domain; otherwise it becomes orphaned infrastructure that nobody understands at the next schema change.
Scaling characteristics. The workload is overwhelmingly read-heavy with a small, stable write set — favorable. Watch for:
disableForeignKeyConstraints, avoid per-row model events).city_id/district_id on the listing row, never resolve the hierarchy per request. This is where naive Streams-based implementations generate N+1 queries.Failure modes.
utf8 boundary.Ramp-up. A mid-level Laravel engineer spends ~1 week becoming productive in Streams' entity model before they can even evaluate the code; the extraction path collapses that to ~2 days of data plumbing. Plan for a 1–2 day discovery spike as the only sunk cost before a go/no-go, and cap total exposure at 5 engineer-days for the extract-and-own route.
Bottom line for a TPM. Do not adopt this as a runtime dependency on a non-Streams stack — the health signals (0 stars, 0 dependents, single 2024 release, score 0.03) make it uninsurable as infrastructure. It is worth exactly one thing: a short spike to harvest a geo hierarchy you then own. Run that spike concurrently with evaluating a maintained reference dataset, and treat "reuse the data, replace the code" as the default outcome.
How can I help you explore Laravel packages today?