howlowck / laravel-postgis-database by howlowck
forked from greglamb/laravel-postgis-database

An extended Postgres driver for Laravel 4 that provides support for PostGIS features.
42
0
2
Package Data
Maintainer Username: howlowck
Maintainer Contact: email@greglamb.me (Greg Lamb)
Package Create Date: 2014-10-07
Package Last Update: 2014-10-07
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-11-22 03:07:15
Package Statistics
Total Downloads: 42
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 0
Total Watchers: 2
Total Forks: 1
Total Open Issues: 0

laravel-postgis-database

Forked from this laravel-postgis-database (that seems to be abandoned)

Provides an extended Postgres driver for Laravel 4 that provides support for PostGIS features

features

  • Adds schema grammer for point
  • Adds schema grammer for polygon

install

composer.json

Add a requirement for the package

{
    "require": {
        "howlowck/laravel-postgis-database": "dev-master"
    }
}

config/app.php

Add it to the list of providers

'providers' => array(
  'Lamb\LaravelPostgisDatabase\PostgisDatabaseServiceProvider'
)

config/database.php

Add a connection using the postgis driver instead of pgsql

  'pgsql' => array(
    'driver'   => 'postgis',
    'host'     => 'localhost',
    'database' => 'database',
    'username' => 'root',
    'password' => '',
    'charset'  => 'utf8',
    'prefix'   => '',
    'schema'   => 'public',
  ),

license

Released under the MIT license