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

Laraversine Laravel Package

freepeace13/laraversine

A lightweight Laravel package for Haversine distance calculations. Compute great-circle distances between latitude and longitude points, then use them for nearby searches, radius filtering, or distance sorting in PHP applications.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Geo/proximity feature decisions: Supports roadmap items such as store locators, delivery-radius checks, “nearest to me” sorting, marketplace local listings, and asset/customer matching. v1.1.0 makes these cheaper to ship by improving the developer ergonomics of distance handling.
  • Build vs. buy: Leans toward “buy” (adopt OSS) for straightforward Haversine-based proximity in Laravel/Eloquent, rather than maintaining custom SQL distance calculations. The new Distance value object reduces bespoke formatting/comparison code; the clearer nearestFirst() error reduces misuse and support overhead.
  • Scope and quality decisions: The distance() accessor and value object make distance a first-class domain concept, which helps with consistent units, threshold comparisons, display formatting, and testability. That supports product requirements like “within 10 km” or “show distance to nearest location.”
  • Risk/roadmap sequencing: This is a minor, non-breaking release, so it can be adopted without a migration project. However, it does not change the package’s fundamental suitability: it remains best for simple proximity queries, not complex geospatial platforms.

When to Consider This Package

  • Consider it when: You are building a Laravel app with Eloquent models that need simple distance calculations, radius filtering, or nearest-first ordering; your geo requirements are basic Haversine use cases; you want faster delivery than custom SQL; and you can accept open-source, likely small-maintainer dependency risk.
  • Evaluate carefully when: You need production-grade geospatial indexing, high query volume, multi-database support, polygon/route/geofence logic, or integration with PostGIS/MySQL spatial features. Also evaluate maintenance activity, issue responsiveness, and test coverage before relying on it for customer-facing SLAs.
  • Look elsewhere when: You need a full geospatial platform, advanced spatial queries, geocoding, routing, or enterprise support. The v1.1.0 release improves ergonomics and error clarity but does not materially change scale or capability limits.

How to Pitch It (Stakeholders)

  • To executives: This is a small, low-cost open-source Laravel package that can accelerate simple “near me” and distance-based features, reducing custom development and bug risk. The latest release adds a cleaner distance API and clearer error handling, improving reliability and developer productivity without breaking changes.
  • To engineering: v1.1.0 adds a Distance value object via a distance() accessor and throws a clear error when nearestFirst() is called before nearby(). That makes proximity code more type-safe, testable, and easier to debug. It is a reasonable fit for straightforward Eloquent Haversine use cases; validate performance and maintenance risk before using it for high-scale or complex geospatial requirements.
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.
socialdept/tenant-domains
tautvydasr/blade-class-names
socialdept/color-scales
maherelgamil/controller
coleus/widgets
coleus/table
coleus/users
coleus/music
coleus/health
coleus/calendar
coleus/notes
coleus/support
coleus/settings
coleus/apps
seampact/laravel
emmyconceptng/laravel-ng-postcode
jjsquady/round-robin
skyraptor/chatter
edlugz/sasapay
abbasudo/artisan-route