2017 © Pedro Peláez
 

library odbc-driver

ODBC Driver for Laravel

image

wajatimur/odbc-driver

ODBC Driver for Laravel

  • Thursday, June 12, 2014
  • by azrijamil
  • Repository
  • 2 Watchers
  • 8 Stars
  • 582 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 49 Forks
  • 1 Open issues
  • 7 Versions
  • 0 % Grown

The README.md

Laravel 4 ODBC Build Status

An ODBC driver implementation, currently its support Laravel Framework only., (*1)

Requirements

  • PHP 5.3+
  • Laravel 4.1.*

Installation

L4ODBC can be install using composer by adding below line into your existing composer.json under require section and executing composer update in your Laravel project root folder., (*2)

"wajatimur/odbc-driver": "dev-master"

Then you need to bootstrap the driver by declaring the service provider registration in you app.php file under app\config path from Laravel project root folder., (*3)

'Foundation\Database\Driver\ODBCDriverServiceProvider',

Configuration

Finally be sure to add the odbc driver with connection information to the config/database.php file like so:, (*4)

    'connections' => array(

        // .. Existing config here ..

        'odbc' => array(
            'driver' => 'odbc',
            'dsn' => 'Driver={iSeries Access ODBC Driver};System=my_system_name;',
            'grammar' => 'DB2',
            'username' => 'foo',
            'password' => 'bar',
            'database' => '',
        ),
    ),

Extending

To create a custom grammar just add your file to Grammars folder within the package. Below is the basic template to create a custom grammar., (*5)

namespace Foundation\Database\Driver\Grammars;

use Illuminate\Database\Query\Grammars\Grammar;

class MyCustomGrammar extends {
    // .. Add your override method here ..
}

Using Custom Grammar

To use the custom grammar, jusct change the grammar key in you database config base on you grammar file name. If you have a custom grammar with file name MyCustomGrammar.php, the grammar key should be as below., (*6)

'odbc' => array(
    'driver' => 'odbc',
    'dsn' => 'some driver',
    'grammar' => 'MyCustomGrammar',
    'username' => 'foo',
    'password' => 'bar',
    'database' => '',
),

If you would like to use a Laravel provided grammar file just add that instead. For example if you want to use SQL Server Gramamr, you can use the SqlServerGrammar as key in your database config. Others grammar provided by Laravel listed below., (*7)

  • MySqlGrammar
  • SqlServerGrammar
  • SQLiteGrammar
  • PostgresGrammar

If you would like to submit a grammar for use in the package please submit a pull request and I will get it in asap., (*8)

The Versions

12/06 2014

dev-master

9999999-dev

ODBC Driver for Laravel

  Sources   Download

MIT

The Requires

 

laravel odbc

30/03 2014

dev-develop

dev-develop

  Sources   Download

The Requires

 

The Development Requires

by Cody Covey

03/02 2014

v1.1.1

1.1.1.0

  Sources   Download

The Requires

 

The Development Requires

by Cody Covey

29/01 2014

v1.1.0

1.1.0.0

  Sources   Download

The Requires

 

The Development Requires

by Cody Covey

25/03 2013

v1.0.1

1.0.1.0

  Sources   Download

The Requires

 

The Development Requires

by Cody Covey

04/03 2013

v0.9

0.9.0.0

  Sources   Download

The Requires

 

The Development Requires

by Cody Covey

04/03 2013

v1.0

1.0.0.0

  Sources   Download

The Requires

 

The Development Requires

by Cody Covey