PHPackages                             expressodev/laravel-codeigniter-db - 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. expressodev/laravel-codeigniter-db

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

expressodev/laravel-codeigniter-db
==================================

Integration layer allowing use of the Laravel database library in CodeIgniter applications

1.0.6(8y ago)294.0k18[4 issues](https://github.com/expressodev/laravel-codeigniter-db/issues)[3 PRs](https://github.com/expressodev/laravel-codeigniter-db/pulls)1MITPHP

Since Mar 4Pushed 8y ago3 watchersCompare

[ Source](https://github.com/expressodev/laravel-codeigniter-db)[ Packagist](https://packagist.org/packages/expressodev/laravel-codeigniter-db)[ RSS](/packages/expressodev-laravel-codeigniter-db/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (3)Versions (8)Used By (1)

Laravel CodeIgniter Database Integration
========================================

[](#laravel-codeigniter-database-integration)

[![Build Status](https://camo.githubusercontent.com/0ddaf75856169013e217baf815d607347486513ceb1bece66f28995d74d6590f/68747470733a2f2f7472617669732d63692e6f72672f657870726573736f6465762f6c61726176656c2d636f646569676e697465722d64622e706e673f6272616e63683d6d6173746572)](https://travis-ci.org/expressodev/laravel-codeigniter-db)[![Latest Stable Version](https://camo.githubusercontent.com/f142d249df05266669b5dbdd199c687de081d9f1b489881d74fb76d696e78bc0/68747470733a2f2f706f7365722e707567782e6f72672f657870726573736f6465762f6c61726176656c2d636f646569676e697465722d64622f76657273696f6e2e706e67)](https://packagist.org/packages/expressodev/laravel-codeigniter-db)

This package allows you to use the excellent Laravel database library ([illuminate/database](https://github.com/illuminate/database)) inside your CodeIgniter applications.

Laravel normally uses [PDO](http://www.php.net/manual/en/intro.pdo.php) to make database connections. CodeIgniter establishes its own connection to the database.

If you are only using the Laravel database components, then this will not be a problem - you can simply disable the CodeIgniter database connection and use Laravel's instead. However, if your application is using a mixture of CodeIgniter and Laravel database libraries, this is the package for you.

This integration layer takes all requests made to the Laravel database library, converts them to raw SQL, then passes them through to the underlying CodeIgniter database driver. This means that you will not need to establish two separate connections to the database, and it also means that CodeIgniter database profiling functions will continue to work correctly.

Usage
-----

[](#usage)

In your `composer.json` file:

```
{
    "require": {
        "expressodev/laravel-codeigniter-db": "~1.0"
    }
}
```

In your application:

```
// use our mock PDO class if PDO is not enabled on this server
if (!class_exists('PDO')) {
    class_alias('Illuminate\CodeIgniter\FakePDO', 'PDO');
}

// pass all Laravel database queries through to CodeIgniter
$ci = get_instance();
$resolver = new Illuminate\CodeIgniter\CodeIgniterConnectionResolver($ci);
Illuminate\Database\Eloquent\Model::setConnectionResolver($resolver);
```

License
-------

[](#license)

[MIT License](https://github.com/expressodev/laravel-codeigniter-db/blob/master/LICENSE)

###  Health Score

37

—

LowBetter than 83% of packages

Maintenance17

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community19

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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 ~209 days

Recently: every ~287 days

Total

7

Last Release

3202d ago

### Community

Maintainers

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

---

Top Contributors

[![amacneil](https://avatars.githubusercontent.com/u/637671?v=4)](https://github.com/amacneil "amacneil (9 commits)")[![rsanchez](https://avatars.githubusercontent.com/u/227340?v=4)](https://github.com/rsanchez "rsanchez (9 commits)")[![dpdexter](https://avatars.githubusercontent.com/u/1043527?v=4)](https://github.com/dpdexter "dpdexter (1 commits)")

---

Tags

laraveldatabaseormcodeigniterexpressionengineilluminateciee

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/expressodev-laravel-codeigniter-db/health.svg)

```
[![Health](https://phpackages.com/badges/expressodev-laravel-codeigniter-db/health.svg)](https://phpackages.com/packages/expressodev-laravel-codeigniter-db)
```

###  Alternatives

[mpyw/laravel-cached-database-stickiness

Guarantee database stickiness over the same user's consecutive requests

83316.8k](/packages/mpyw-laravel-cached-database-stickiness)[mpyw/laravel-database-advisory-lock

Advisory Locking Features of Postgres/MySQL/MariaDB on Laravel

2860.5k](/packages/mpyw-laravel-database-advisory-lock)[andreagroferreira/laravel-sync-tracker

A Laravel package for tracking entity synchronization status between systems

113.0k](/packages/andreagroferreira-laravel-sync-tracker)

PHPackages © 2026

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