PHP code example of mkrohn / laravel-odbc-informix

1. Go to this page and download the library: Download mkrohn/laravel-odbc-informix library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

mkrohn / laravel-odbc-informix example snippets


'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
        ]
    ]
]

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

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