8000 GitHub - apptimists/laravel-spatial: Laravel 5 package working with spatial data
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

apptimists/laravel-spatial

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Laravel Spatial extension

This package is fully untested, undocumented and unstable and is a combination of the two great packages:

Installation

Installation made super-easy with composer:

composer require apptimists/laravel-spatial

Also add the LaravelSpatial\SpatialServiceProvider::class to your config/app.php.

Requirements

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.

Usage

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();

About

Laravel 5 package working with spatial data

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

0