PHPackages                             anchan42/db2-driver - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Database &amp; ORM](/categories/database)
4. /
5. anchan42/db2-driver

ActiveLibrary[Database &amp; ORM](/categories/database)

anchan42/db2-driver
===================

DB2 for IBM iSeries drop-in Laravel driver

v0.0.4(1y ago)08MITPHPPHP ^8.1

Since Aug 28Pushed 1y agoCompare

[ Source](https://github.com/anchan42/db2-driver)[ Packagist](https://packagist.org/packages/anchan42/db2-driver)[ Docs](https://github.com/bwicompanies/db2-driver)[ RSS](/packages/anchan42-db2-driver/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (4)Dependencies (9)Versions (5)Used By (0)

![](https://camo.githubusercontent.com/058d37097e9462afa26d12d620dee1bac3bea5226118d8e86d1493ebbdd1812b/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f6462322d6472697665722e706e673f7468656d653d6461726b267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d627769636f6d70616e6965732532466462322d647269766572267061747465726e3d62616e6b4e6f7465267374796c653d7374796c655f31266465736372697074696f6e3d4442322b666f722b49424d2b695365726965732b636f6e6e65637469766974792b666f722b4c61726176656c266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d736572766572267769647468733d6175746f)

DB2 for IBM iSeries Laravel Driver
==================================

[](#db2-for-ibm-iseries-laravel-driver)

This package allows you to use Laravel's query builder and eloquent with DB2 for IBM iSeries by extending the Illuminate Database component of the Laravel framework. Originally forked from [cooperl22/laravel-db2](https://github.com/cooperl22/laravel-db2).

Requirements
------------

[](#requirements)

- PHP PDO\_ODBC extension
- IBM i Access ODBC Driver ([Windows &amp; Linux](https://ibmi-oss-docs.readthedocs.io/en/latest/odbc/installation.html))

Installation
------------

[](#installation)

Install the package via composer:

```
composer require bwicompanies/db2-driver
```

Add a new connection in `database.php`:

> Note: You can specify the connection name, but the driver must be 'db2'

```
'myDB2Connection' => [
    'driver'        => 'db2',
    'driverName'    => '{IBM i Access ODBC Driver}',
    'host'          => env('DB_HOST'),
    'username'      => env('DB_USERNAME'),
    'password'      => env('DB_PASSWORD'),
    'database'      => env('DB_DATABASE'),
    'prefix'        => '',
    'schema'        => env('DB_SCHEMA'),
    'port'          => env('DB_PORT', 50000),
    'date_format'   => 'Y-m-d H:i:s', // or 'Y-m-d H:i:s.u' / 'Y-m-d-H.i.s.u'
    'offset_compatibility_mode' => true,
    'odbc_keywords' => [
        'SIGNON'                => 3,
        'SSL'                   => 0,
        'CommitMode'            => 0,
        'ConnectionType'        => 0,
        'DefaultLibraries'      => '',
        'Naming'                => 1,
        'UNICODESQL'            => 0,
        'DateFormat'            => 5,
        'DateSeperator'         => 0,
        'Decimal'               => 0,
        'TimeFormat'            => 0,
        'TimeSeparator'         => 0,
        'TimestampFormat'       => 0,
        'ConvertDateTimeToChar' => 0,
        'BLOCKFETCH'            => 1,
        'BlockSizeKB'           => 32,
        'AllowDataCompression'  => 1,
        'CONCURRENCY'           => 0,
        'LAZYCLOSE'             => 0,
        'MaxFieldLength'        => 15360,
        'PREFETCH'              => 0,
        'QUERYTIMEOUT'          => 1,
        'DefaultPkgLibrary'     => 'QGPL',
        'DefaultPackage'        => 'A /DEFAULT(IBM),2,0,1,0',
        'ExtendedDynamic'       => 1,
        'QAQQINILibrary'        => '',
        'SQDIAGCODE'            => '',
        'LANGUAGEID'            => 'ENU',
        'SORTTABLE'             => '',
        'SortSequence'          => 0,
        'SORTWEIGHT'            => 0,
        'AllowUnsupportedChar'  => 0,
        'CCSID'                 => 1208,
        'GRAPHIC'               => 0,
        'ForceTranslation'      => 0,
        'ALLOWPROCCALLS'        => 0,
        'DB2SQLSTATES'          => 0,
        'DEBUG'                 => 0,
        'TRUEAUTOCOMMIT'        => 0,
        'CATALOGOPTIONS'        => 3,
        'LibraryView'           => 0,
        'ODBCRemarks'           => 0,
        'SEARCHPATTERN'         => 1,
        'TranslationDLL'        => '',
        'TranslationOption'     => 0,
        'MAXTRACESIZE'          => 0,
        'MultipleTraceFiles'    => 1,
        'TRACE'                 => 0,
        'TRACEFILENAME'         => '',
        'ExtendedColInfo'       => 0,
    ],
    'options' => [
        PDO::ATTR_CASE             => PDO::CASE_LOWER,
        PDO::ATTR_EMULATE_PREPARES => false,
        PDO::ATTR_PERSISTENT       => false,
    ]
],
```

> Note: Be sure to define the appropriate keys in `.env`.

Other Resources
---------------

[](#other-resources)

- [DB2 Connection String Keywords](https://www.ibm.com/docs/fr/i/7.3?topic=details-connection-string-keywords)
- [PDO Attributes](https://www.w3resource.com/php/pdo/php-pdo.php)
- [ACS / IBM i Access Driver Release Notes](https://www.ibm.com/support/pages/ibm-i-access-acs-updates-pase)
- [Seiden Group](https://www.seidengroup.com/blog/)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance48

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 52.6% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~122 days

Total

3

Last Release

384d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ac66381b29914b0d8833a6bc44f6e7b133f44689b1d5c5c4cd6b59c2f5c72eae?d=identicon)[anchan42](/maintainers/anchan42)

---

Top Contributors

[![bennettblack](https://avatars.githubusercontent.com/u/51721783?v=4)](https://github.com/bennettblack "bennettblack (10 commits)")[![anchan42](https://avatars.githubusercontent.com/u/19514416?v=4)](https://github.com/anchan42 "anchan42 (5 commits)")[![sluggern67](https://avatars.githubusercontent.com/u/57130207?v=4)](https://github.com/sluggern67 "sluggern67 (2 commits)")[![alanseiden](https://avatars.githubusercontent.com/u/5905791?v=4)](https://github.com/alanseiden "alanseiden (1 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (1 commits)")

---

Tags

laravelBWICompaniesdb2-driver

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/anchan42-db2-driver/health.svg)

```
[![Health](https://phpackages.com/badges/anchan42-db2-driver/health.svg)](https://phpackages.com/packages/anchan42-db2-driver)
```

###  Alternatives

[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[clickbar/laravel-magellan

This package provides functionality for working with the postgis extension in Laravel.

423715.4k1](/packages/clickbar-laravel-magellan)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[reedware/laravel-relation-joins

Adds the ability to join on a relationship by name.

2121.2M13](/packages/reedware-laravel-relation-joins)[outerweb/settings

Application wide settings stored in your database

4899.2k5](/packages/outerweb-settings)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
