ricorocks-digital-agency/giveaninch

A package that simplifies calculations around distance and metrics.
2,443 2
Install
composer require ricorocks-digital-agency/giveaninch
Latest Version:1.1.0
PHP:^7.1|^8.0
License:MIT
Last Updated:Feb 1, 2021
Links: GitHub  ·  Packagist
Maintainer: 96downlu

GiveAnInch

A Laravel package that provides geographic distance calculations between points.

Installation

You can install the package via composer:

composer require ricorocks-digital-agency/giveaninch

Usage

Using the package is simple via the GiveAnInch facade.

Get the distance in KM between two points

GiveAnInch::from(0, 0)->to(0, 0)->getDistance();

Check if two coordinates are within a given radius of each other

GiveAnInch::from(0, 0)->to(0, 0)->isWithin(10);

Testing

composer test

Changelog

Please see CHANGELOG for more information what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email lukeraymonddowning@gmail.com instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.

Laravel Package Boilerplate

This package was generated using the Laravel Package Boilerplate.

Related Packages

doctrine/dbal

Powerful PHP database abstraction layer (DBAL) with many features for database s...

634,760,849 9,707
laravel/framework

The Laravel Framework.

584,532,650 34,931
laravel/tinker

Powerful REPL for the Laravel framework.

493,838,477 7,443
laravel/serializable-closure

Laravel Serializable Closure provides an easy and secure way to serialize closur...

408,553,772 609
nunomaduro/collision

Cli error handling for console/command-line PHP applications.

387,976,821 4,658