PHP code example of michaelb / laravel-db2

1. Go to this page and download the library: Download michaelb/laravel-db2 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/ */

    

michaelb / laravel-db2 example snippets


'providers' => [
    MichaelB\Database\DB2\DB2ServiceProvider::class
],

    /*
    |--------------------------------------------------------------------------
    | DB2 Databases
    |--------------------------------------------------------------------------
    */

    'odbc' => [
        'driver'         => 'odbc',
        'host'           => '',
        'database'       => '',
        'username'       => '',
        'password'       => '',
        'charset'        => 'utf8',
        'ccsid'          => 1208,
        'prefix'         => '',
        'schema'         => '',
        'i5_libl'        => '',
        'i5_lib'         => '',
        'i5_commit'      => 0,
        'i5_naming'      => 0,
        'i5_date_fmt'    => 5,
        'i5_date_sep'    => 0,
        'i5_decimal_sep' => 0,
        'i5_time_fmt'    => 0,
        'i5_time_sep'    => 0,
        'options'  => [
            PDO::ATTR_CASE => PDO::CASE_LOWER,
            PDO::ATTR_EMULATE_PREPARES => false,
            PDO::ATTR_PERSISTENT => false
            ]
    ],

    'ibm' => [
        'driver'         => 'ibm',
        'host'           => '',
        'database'       => '',
        'username'       => '',
        'password'       => '',
        'charset'        => 'utf8',
        'ccsid'          => 1208,
        'prefix'         => '',
        'schema'         => '',
        'i5_libl'        => '',
        'i5_lib'         => '',
        'i5_commit'      => 0,
        'i5_naming'      => 0,
        'i5_date_fmt'    => 5,
        'i5_date_sep'    => 0,
        'i5_decimal_sep' => 0,
        'i5_time_fmt'    => 0,
        'i5_time_sep'    => 0,
        'options'  => [
            PDO::ATTR_CASE => PDO::CASE_LOWER,
            PDO::ATTR_EMULATE_PREPARES => false,
            PDO::ATTR_PERSISTENT => false
        ]
    ],


$ php artisan config:publish michaelb/laravel-db2