1. Go to this page and download the library: Download jeorgy/laravel-postgis library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
jeorgy / laravel-postgis example snippets
namespace App;
use Jeorgy\LaravelPostgis\Postgis;
use Illuminate\Database\Eloquent\Model;
class UserLocation extends Model
{
use Postgis;
}
protected $location = "my_column";
protected $unit = "km"; //units avialble [mile, km, meter]