greglamb / laravel-postgis-database

An extended Postgres driver for Laravel 4 that provides support for PostGIS features
14 stars 13 forks source link

laravel-postgis-database

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

features

install

composer.json

Add a requirement for the package

{
    "require": {
        "lamb/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