Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Laravel Iseries Db2

Laravel Iseries Db2 Laravel Package

emkcloud/laravel-iseries-db2

Laravel package that adds IBM DB2 for i (iSeries/AS400) database support, letting your app connect through Laravel's query builder and Eloquent using an easy-to-configure custom connection driver.

View on GitHub
Deep Wiki
Context7

Laravel integration with DB2 on IBM iSeries (formerly AS/400)

Frequently asked questions about Laravel Iseries Db2
What is emkcloud/laravel-iseries-db2 used for?
It adds IBM i DB2 for i connectivity to Laravel so applications can use the query builder, Eloquent, migrations, raw SQL, and standard Laravel workflows against iSeries or AS400 data. It acts as a custom connection driver and schema bridge rather than a separate ORM. It is aimed at teams integrating Laravel with legacy AS/400 applications.
How do I install and configure the iSeries DB2 driver in Laravel?
Install it with Composer as emkcloud/laravel-iseries-db2, then add an iSeries connection in config/database.php. The connection is config-driven for host, library, username, and password. Run a simple query or migration against a disposable library to confirm the driver is registered and the credentials work.
Does this package support Eloquent models and Laravel's query builder?
Yes. The package is designed to work with Laravel's query builder and Eloquent models once the iSeries connection is configured. It integrates with Laravel's database manager rather than requiring custom glue code. Standard model queries and schema workflows should route through the configured connection.
Can I run Laravel migrations and migrate:fresh against IBM i DB2?
Yes, version 1.2.4 adds dropAllTables() and dropAllViews() so migrate:fresh can complete on iSeries instead of throwing the previous unsupported-driver error. This restores parity with standard Laravel schema operations for the driver. Because migrate:fresh is destructive, exercise it first against a disposable iSeries library.
Which Laravel versions are supported by this iSeries driver?
The package plugs into Laravel's database manager and schema builder, so the correct constraint depends on the release you install. The technical review specifically flags confirming Laravel 9, 10, and 11 compatibility because base schema builder behavior varies across those versions. Check the package's Composer requirements and test in a non-production environment before upgrading.
How does migrate:fresh handle dropping tables and views on iSeries?
Version 1.2.4 adds dropAllTables() and dropAllViews() to the custom SchemaBuilder so migrate:fresh no longer falls through to the base implementation. The provided assessment does not confirm the internal call order between dropping views and tables. Validate on a library containing layered views before relying on it in CI or production-like environments.
What privileges does the DB2 for i user need for migrations and migrate:fresh?
The configured user needs DROP privileges on the tables and views in the target library for migrate:fresh to succeed. Read-heavy integration accounts may not have those grants, so a dedicated migration user is safer. Grant DROP only where appropriate, especially in development and CI libraries.
Is it safe to run migrate:fresh against a production iSeries library?
migrate:fresh is destructive by design and drops all tables and views in the configured library, just as it does on MySQL or PostgreSQL. The blast radius is the library the connection points to, so never point a production or shared library at a migrate:fresh run. Use disposable libraries for testing and enforce environment guardrails in Laravel.
Does the driver support raw SQL and schema operations like dropAllTables?
Yes. The package supports raw SQL and standard Laravel schema workflows through the custom connection and schema builder. Version 1.2.4 specifically restores dropAllTables() and dropAllViews() so migrate:fresh can complete. Other schema operations follow Laravel's usual behavior for the driver.
What are alternatives to this package for connecting Laravel to AS/400 DB2?
Alternatives include ODBC-based Laravel connections, a custom PDO driver, or a middleware service for AS/400 data access. This package is positioned as a lightweight bridge that plugs DB2 for i into Laravel's query builder and Eloquent without custom glue code. Evaluate maintenance activity, Laravel version support, and schema-operation coverage before choosing.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
shitoudev/permissionmanager
johannesclimacus/laravel-tui
hocvt/seotools
vitalybaev/sypexgeo
amphibee/themosis-ignition
gito-me/fast-excel
frankyso/laravel-ipaymu
geolize-studio/laravel-chile
boomerangui/chat
jinas/dhivatar
store-doc/laravel-storage-driver
plus-it/laravel-translation-manager
diephp/perhaps
diephp/telegraph
osmaviation/spreadsheet
microsoft/fluentui-system-icons
mmccook/php-json-canonicalization-scheme
middlewares/firewall
qubiqx/montapacking
nyoncode/laravel-package-console