Skip to content

mkrohn/laravel-odbc-informix

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

ODBC integration for Laravel Framework using IBM Informix Database

This integration allows the use of odbc_* php function with Laravel framework instead of PDO.
It emulates PDO class used by Laravel.
This is a fork of the project abram/laravel-odbc, but customized for informix.

# How to install

composer require mkrohn/laravel-odbc-informix To add source in your project

# Usage Instructions

It's very simple to configure:

1) Add database to database.php file

'odbc-connection-name' => [
    'driver' => 'odbc',
    'dsn' => 'OdbcConnectionName',
    'database' => 'DatabaseName',
    'odbc' => true,
    'host' => '127.0.0.1',
    'username' => 'username',
    'password' => 'password'
    'options' => [
        'processor' => Mkrohn\Odbc\Informix\Query\Processors\InformixProcessor::class,
        'grammar' => [
            'query' => Mkrohn\Odbc\Informix\Query\Grammars\InformixGrammar::class,
            'schema' => Mkrohn\Odbc\Informix\Schema\Grammars\InformixGrammar::class
        ]
    ]
]

# Eloquent ORM

You can use Laravel, Eloquent ORM and other Illuminate's components as usual.

# Facade
$books = DB::connection('odbc-connection-name')->table('books')->where...;

# ORM
$books = Book::where...->get();

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages