ajarunthomas / haversine
calculate distance between 2 geolocations using haversine formula
v1.0.0
2021-01-18 08:44 UTC
Requires
- php: >=7.2.0
README
A Simple Facade for Laravel that calculates the Distance between 2 geo locations defined by latitude and longitude details using the Haversine Formula.
Instructions
Installation using composer
composer require ajarunthomas/haversine
Include the Facade
use Ajarunthomas\Facades\Haversine;
Optionally include the Facade in the aliases section of the app.php
config file
'Haversine' => Ajarunthomas\Facades\Haversine::class,
Calculate the distance between 2 cordinates
$distance = Haversine::distance([24.885368,55.120223],[25.223954,55.274097]);