Download the PHP package canylmz/laravel-postgis without Composer
On this page you can find all versions of the php package canylmz/laravel-postgis. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download canylmz/laravel-postgis
More information about canylmz/laravel-postgis
Files in canylmz/laravel-postgis
Package laravel-postgis
Short Description This package implemented for calculate or check the distance between point and other database points.
License MIT
Homepage https://github.com/canylmz/laravel6-postgis
Informations about the package laravel-postgis
Laravel 6 PostGIS
This package implemented for calculate or check the distance between point and other database points.
Installation
PHP >=7.2 and Laravel 6.0 are required.
the package used Laravel postgis extension to deal with postgres database points in laravel, so if need more details or how to enable postgis extension in php see previous link.
To get the latest version of Laravel 6 PostGIS, simply require the project using Composer:
Usage
1 . First of all use Postgis
trait in your model
2 . By default package assume that the name of the point column is location
if you want to change it override location
variable on your model
3 . Also By default package assume that the unit of distance is meter
if you want to change it override unit
variable on your model
Functions
1. withDistance
get the distance between point and other points
2. whereDistance
check the distance between a point and other points in database