| Package Data | |
|---|---|
| Maintainer Username: | johannesberdin |
| Maintainer Contact: | ich@johannesberdin.de (Johannes Berdin) |
| Package Create Date: | 2017-05-11 |
| Package Last Update: | 2019-01-03 |
| Home Page: | |
| Language: | PHP |
| License: | MIT |
| Last Refreshed: | 2025-10-20 03:03:14 |
| Package Statistics | |
|---|---|
| Total Downloads: | 191 |
| Monthly Downloads: | 0 |
| Daily Downloads: | 0 |
| Total Stars: | 4 |
| Total Watchers: | 2 |
| Total Forks: | 4 |
| Total Open Issues: | 3 |
This package is fully untested, undocumented and unstable and is a combination of the two great packages:
Installation made super-easy with composer:
composer require apptimists/laravel-spatial
Also add the LaravelSpatial\SpatialServiceProvider::class to your config/app.php.
Works with PostgreSQL installed PostGIS extension and MySQL at least version 5.6.
If you try using it on a shared host which is not fulfilling those requirements, change your provider.
We use the GeoJson PHP Library for describing spatial fields as GeoJSON object, e.g.:
use GeoJSON\Geometry\Point;
...
$eloquent = new MyModel();
$eloquent->location = new Point([49.7, 6.9]);
...
$eloquent->save();