Brings Laravel's database tools and Eloquent models to db2
Use Laravel's database and Eloquent tools on DB2 with no fuss
This is a very very preliminary release of this package and should be used at your own risk. The code here does everything I need it to, but does not yet fully implement Laravel's database or Eloquent components. Suggestions are gratefully accepted. Pull Requests are even more gratefully accepted.
LaravelDB2Bridge is open-sourced software licensed under the MIT license, the same license Laravel uses.
LaravelDB2Bridge wraps PHP's native db2_* database functions to be called from Laravel. You must have
ibm_db2 extension installed to use this package.
$ composer require jtgrimes\laravel-db2-bridge
Once Composer has installed or updated your packages, you need to register
LaravelDB2Bridge with Laravel itself. Open up
find the providers key towards the bottom and add:
When you use LaravelDB2Bridge, DB2 becomes just another database driver in Laravel. To configure
your database, open
/config/database.php and add the following to the
'db2' => [ 'username' => env('DB_USERNAME'), 'password' => env('DB_PASSWORD'), 'dbname' => '*LOCAL', 'options' => [ 'i5_libl' => 'QTEMP OTHERLIB ANOTHEROTHERLIB', 'i5_naming' => 'DB2_I5_NAMING_OFF', ... ], ],
Obviously, you can tweak those settings to suit your needs. All of the
connection options are available and
can be set in the
Taylor Otwell wrote Laravel which is awesome, but he shares no blame for this package. Alan Seiden deserves a little blame for encouraging me to release this package. If you're running PHP on the IBM iSeries, he's the guy to hit up for help.