2017 © Pedro Peláez
 

library laravel-easy-postgis

image

ajthinking/laravel-easy-postgis

  • Wednesday, January 4, 2017
  • by ajthinking
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 10 Versions
  • 5 % Grown

The README.md

Laravel Easy PostGIS

When you want geometry data types in your Laravel project. This package keeps the geometry support strictly on the database side, making it easier to use together with other third party packages affecting your Models. On the laravel side only WKT-strings are used. For a more powerful and integrated approach, see https://github.com/njbarrett/laravel-postgis, (*1)

Install

composer require ajthinking/laravel-easy-postgis

Add the service provider to providers array in config/app.php:, (*2)

Ajthinking\LaravelEasyPostGIS\LaravelEasyPostGISServiceProvider::class, 

Publish the configs to config/postgis.php:, (*3)

php artisan vendor:publish

How it works

  • In your migration, create a string field as $NAME$_$GEOMETRY$_wkt. Example: "park_polygon_wkt"
  • php artisan migrate
  • php artisan postgis

This will create a mirrored geometry column for instance "park_polygon_geom". It will also add trigger functions to your table. Now, whenever you Insert or Update on your table, the database will make sure any _geom column is in sync with the corresponding _wkt-column., (*4)

Configuration

In config/postgis.php you can set: * column type indicators (wkt/geometry) * geometry type indicators (POLYGON, LINESTRING ...) * database prefix for triggers and functions * srid (default is 4326) * database schema (default is public), (*5)

Versions

This package was developed with/for * Laravel 5.3 * PostgreSQL 9.5, (*6)

License

CC0 - use however you want., (*7)

The Versions

04/01 2017

dev-master

9999999-dev

  Sources   Download

CC0

by Anders Jurisoo

04/01 2017

3.0

3.0.0.0

  Sources   Download

CC0

by Anders Jurisoo

04/01 2017

2.1

2.1.0.0

  Sources   Download

CC0

by Anders Jurisoo

03/01 2017

2.0

2.0.0.0

  Sources   Download

CC0

by Anders Jurisoo

03/01 2017

1.9

1.9.0.0

  Sources   Download

CC0

by Anders Jurisoo

01/01 2017

1.6

1.6.0.0

  Sources   Download

CC0

by Anders Jurisoo

01/01 2017

1.3

1.3.0.0

  Sources   Download

CC0

by Anders Jurisoo

01/01 2017

1.4

1.4.0.0

  Sources   Download

CC0

by Anders Jurisoo

01/01 2017

1.1

1.1.0.0

  Sources   Download

CC0

by Anders Jurisoo

01/01 2017

1.0

1.0.0.0

  Sources   Download

CC0

by Anders Jurisoo