Skip to content
Informix DB driver for Laravel 5
PHP
Branch: master
Clone or download
Pull request Compare This branch is 10 commits ahead, 2 commits behind llaiajiale:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src
.gitignore
.php_cs
LICENSE
README.md
composer.json

README.md

Laravel Informix Database Package

Laravel-ifx is an Informix Database Driver package for Laravel Framework - thanks @taylorotwell. Laravel-ifx is an extension of Illuminate/Database that uses either the PDO extension wrapped into the PDO namespace.

Please report any bugs you may find.

Installation

Require the package:

$ composer require poyii/laravel-ifx

Skip below step if you are running Laravel newer than 5.6.

Once Composer has installed or updated your packages you need to register Informix DB. Open up config/app.php and find the providers key and add:

Poyii\Informix\InformixDBServiceProvider::class,

Finally, add the following in config/database.php, in connections key.

'informix' => [
    'driver'          => 'informix',
    'host'            => env('DB_HOST', 'localhost'),
    'database'        => env('DB_DATABASE', 'forge'),
    'username'        => env('DB_USERNAME', 'forge'),
    'password'        => env('DB_PASSWORD', ''),
    'service'         => env('DB_SERVICE', '11143'),
    'server'          => env('DB_SERVER', ''),
    'db_locale'       => 'en_US.819',
    'client_locale'   => 'en_US.819',
    'db_encoding'     => 'GBK',
    'initSqls'        => false,
    'client_encoding' => 'UTF-8',
    'prefix'          => '',
],

This will copy the configuration file to config/informix.php

Set Informix DB .env

You may need to add the following in the .env file if you are not have it in your environment setup.

INFORMIXDIR=/opt/IBM/informix
INFORMIXSERVER=ol-your-server
LD_LIBRARY_PATH=/opt/IBM/informix/lib/:/opt/IBM/informix/lib/cli:/opt/IBM/informix/lib/esql
PATH=/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/opt/IBM/informix/bin:/opt/IBM/informix/lib

License

Licensed under the MIT License.

You can’t perform that action at this time.