PHPackages                             thalfm/laravel-ibmi - 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. thalfm/laravel-ibmi

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

thalfm/laravel-ibmi
===================

7.0.0(6y ago)0923MITPHPPHP &gt;=5.4.0

Since Apr 22Pushed 6y agoCompare

[ Source](https://github.com/thalfm/laravel-ibmi)[ Packagist](https://packagist.org/packages/thalfm/laravel-ibmi)[ RSS](/packages/thalfm-laravel-ibmi/feed)WikiDiscussions master Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (24)Used By (0)

laravel-ibmi
============

[](#laravel-ibmi)

[![Latest Stable Version](https://camo.githubusercontent.com/d321448fd326e8e2fa88beb0a521e3e19299fabecca65615de2b81dd47a5a821/68747470733a2f2f706f7365722e707567782e6f72672f636f6f7065726c2f6c61726176656c2d69626d692f762f737461626c65)](https://packagist.org/packages/cooperl/laravel-ibmi)[![Total Downloads](https://camo.githubusercontent.com/284fd9eb63c97a8a66ff22387953193cb29ef9a54ffc19cd1d5b2d668d605ef4/68747470733a2f2f706f7365722e707567782e6f72672f636f6f7065726c2f6c61726176656c2d69626d692f646f776e6c6f616473)](https://packagist.org/packages/cooperl/laravel-ibmi)[![Latest Unstable Version](https://camo.githubusercontent.com/7a87367d3cfa053cf7c5b0c23460ab94cea53e2740cdb64592f89b47dceda844/68747470733a2f2f706f7365722e707567782e6f72672f636f6f7065726c2f6c61726176656c2d69626d692f762f756e737461626c65)](https://packagist.org/packages/cooperl/laravel-ibmi)[![License](https://camo.githubusercontent.com/ac1f3b645bc0a02732716b8d8aa39af43ce841325c2dc838a701c66cfd7d5c1a/68747470733a2f2f706f7365722e707567782e6f72672f636f6f7065726c2f6c61726176656c2d69626d692f6c6963656e7365)](https://packagist.org/packages/cooperl/laravel-ibmi)

laravel-ibmi is a simple DB2 &amp; Toolkit for IBMi service provider for Laravel. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework. Plus it also provides Toolkit for IBMi so that you can access IBMi resources with same credentials.

---

- [Installation](#installation)
- [Configuration](#configuration)
- [Usage](#usage)

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

[](#installation)

Add laravel-ibmi to your composer.json file:

```
"require": {
    "cooperl/laravel-ibmi": "^6.0"
}

```

Use [composer](https://getcomposer.org) to install this package.

```
$ composer update

```

### Configuration

[](#configuration)

There are two ways to configure laravel-ibmi. You can choose the most convenient way for you. You can put your DB2 credentials into `app/config/database.php` (option 1) file or use package config file which you can be generated through command line by artisan (option 2).

#### Option 1: Configure DB2 using `app/config/database.php` file

[](#option-1-configure-db2-using-appconfigdatabasephp-file)

Simply add this code at the end of your `app/config/database.php` file:

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

    'ibmi' => [
        'driver' => 'db2_ibmi_odbc',
        // or 'db2_ibmi_ibm' / 'db2_zos_odbc' / 'db2_expressc_odbc
        'driverName' => '{IBM i Access ODBC Driver}',
        // or '{iSeries Access ODBC Driver}' / '{IBM i Access ODBC Driver 64-bit}'
        'host' => 'server',
        'username' => '',
        'password' => '',
        'database' => 'WRKRDBDIRE entry',
        'prefix' => '',
        'schema' => 'default schema',
        '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'...
        'odbc_keywords' => [
            'SIGNON' => 3,
            'SSL' => 0,
            'CommitMode' => 2,
            'ConnectionType' => 0,
            'DefaultLibraries' => '',
            'Naming' => 0,
            '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' => 0,
            'QAQQINILibrary' => '',
            'SQDIAGCODE' => '',
            'LANGUAGEID' => 'ENU',
            'SORTTABLE' => '',
            'SortSequence' => 0,
            'SORTWEIGHT' => 0,
            'AllowUnsupportedChar' => 0,
            'CCSID' => 819,
            '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_PERSISTENT => false,
            PDO::I5_ATTR_DBC_SYS_NAMING => false,
            PDO::I5_ATTR_COMMIT => PDO::I5_TXN_NO_COMMIT,
            PDO::I5_ATTR_JOB_SORT => false,
            PDO::I5_ATTR_DBC_LIBL => '',
            PDO::I5_ATTR_DBC_CURLIB => '',
        ],
        'toolkit' => [
            'sbmjobParams' => 'ZENDPHP7/ZSVR_JOBD/XTOOLKIT',
            'XMLServiceLib' => 'ZENDPHP7',
            'debug' => false,
            'debugLogFile' => storage_path('logs / toolkit_gigc . log'),
            'InternalKey' => ' / tmp / ' . 'Toolkit_' . env('APP_ENV') . '_' . random_int(1, 10),
            'stateless' => false,
            'plugSize' => '512K',
            'encoding' => "UTF-8",
            'ccsidBefore' => "819/1147",
            'ccsidAfter' => "1147/1208",
            'useHex' => true
        ],
    ],
```

driver setting can be:

- 'db2\_ibmi\_odbc' for IBMi ODBC connection
- 'db2\_ibmi\_ibm' for IBMi PDO\_IBM connection
- 'db2\_zos\_odbc' for zOS ODBC connection
- 'db2\_expressc\_odbc for Express-C ODBC connection

Then if driver is 'db2\_\*\_odbc', database must be set to ODBC connection name. if driver is 'db2\_ibmi\_ibm', database must be set to IBMi database name (WRKRDBDIRE).

#### Option 2: Configure DB2 using package config file

[](#option-2-configure-db2-using-package-config-file)

Run on the command line from the root of your project:

```
$ php artisan vendor:publish

```

Set your laravel-db2 credentials in `app/config/db2.php`the same way as above

Usage
-----

[](#usage)

#### Database usage

[](#database-usage)

consult the [Laravel framework documentation](https://laravel.com/docs).

#### Toolkit for IBMi usage :

[](#toolkit-for-ibmi-usage-)

This package ships with a facade called `TS` for ToolkitService which is the name of the main class.

here is an example of how to use this facade:

```
    $param[] = TS::AddParameterChar('both', 10, 'InventoryCode', 'code', $code);
    $param[] = TS::AddParameterChar('both', 10, 'Description', 'desc', $desc);
    $result = TS::PgmCall("COMMONPGM", "ZENDSVR", $param, null, null);
    if($result)
    {
        var_dump($result['io_param']);
    }
    else
    {
        echo "Execution failed.";
    }
```

If you want to choose another connection than the default one just do this:

```
    $param[] = TS::connection('other_connection')->AddParameterChar('both', 10, 'InventoryCode', 'code', $code);
    $param[] = TS::connection('other_connection')->AddParameterChar('both', 10, 'Description', 'desc', $desc);
    $result = TS::connection('other_connection')->PgmCall("COMMONPGM", "ZENDSVR", $param, null, null);
    if($result)
    {
        var_dump($result['io_param']);
    }
    else
    {
        echo "Execution failed.";
    }
```

for more details please consult [PHP XMLSERVICE Toolkit documentation](https://docs.roguewave.com/en/zend/current/content/php_toolkit_xml_service_functions.htm).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~76 days

Recently: every ~122 days

Total

24

Last Release

2280d ago

Major Versions

1.0 → 2.02015-05-06

2.3.2 → 5.32017-04-14

5.8.0 → 6.0.02019-09-25

6.0.1 → 7.0.02020-02-13

PHP version history (4 changes)1.0PHP &gt;=5.4.0

5.5PHP &gt;=7.0.0

5.6PHP &gt;=7.1.3

6.0.0PHP ^7.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2f2b5282ece6b1e39dc7e361be2a7640b7e9f6534d454c8ee39b015b7ec29428?d=identicon)[thalfm](/maintainers/thalfm)

---

Top Contributors

[![cooperl22](https://avatars.githubusercontent.com/u/12048268?v=4)](https://github.com/cooperl22 "cooperl22 (14 commits)")

---

Tags

laraveldatabasepdodb2odbcIBMias400ToolkitAPI

### Embed Badge

![Health badge](/badges/thalfm-laravel-ibmi/health.svg)

```
[![Health](https://phpackages.com/badges/thalfm-laravel-ibmi/health.svg)](https://phpackages.com/packages/thalfm-laravel-ibmi)
```

###  Alternatives

[cooperl/laravel-ibmi

laravel-ibmi is a simple DB2 &amp; Toolkit for IBMi service provider for Laravel. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework. Plus it also provides Toolkit for IBMi so that you can access IBMi resources with same credentials.

1013.9k](/packages/cooperl-laravel-ibmi)[cooperl/laravel-db2

laravel-db2 is a simple DB2 service provider for Laravel. It provides DB2 Connection by extending the Illuminate Database component of the laravel framework.

58120.3k1](/packages/cooperl-laravel-db2)

PHPackages © 2026

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