Mouhssine Soumairi
Mouhssine Soumairi

Reputation: 93

Laravel with Informix database

I am using an Informix database and it seems like Laravel doesn't support it by default.

How can I use an Informix database with Laravel?

Your help is really appreciated!

I am using PHP 5.6.

Upvotes: 1

Views: 1515

Answers (2)

Rabin
Rabin

Reputation: 886

Had the same need, but the above process won't work with newer version of laravel as the package is locked on version <= 5.2, so you will have to overwrite the repository to fix it.

I have documented the process for my self here: https://blog.rabin.io/sysadmin/laravel-lumen-informix

Upvotes: 0

You need to use a third party package. Laravel Informix Database Package

Just download it using composer, add the dependency, add the db provider and then publish your new config.

Step by step

Add to your composer.json file

"require": {
    "poyii/laravel-ifx": "1.0.0"
} 

Then run composer update

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 you need to publish a configuration file by running the following Artisan command.

$ php artisan vendor:publish

Upvotes: 1

Related Questions