PHPackages                             carlosocarvalho/eloquent-codeigniter - 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. carlosocarvalho/eloquent-codeigniter

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

carlosocarvalho/eloquent-codeigniter
====================================

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

2.0.2(9y ago)13511MITPHPPHP &gt;=5.4

Since Mar 4Pushed 9y ago2 watchersCompare

[ Source](https://github.com/carlosocarvalho/eloquent-codeigniter)[ Packagist](https://packagist.org/packages/carlosocarvalho/eloquent-codeigniter)[ RSS](/packages/carlosocarvalho-eloquent-codeigniter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (2)Dependencies (3)Versions (10)Used By (0)

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

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 56.3% 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 ~145 days

Recently: every ~222 days

Total

9

Last Release

3287d ago

Major Versions

1.0.5 → 2.0.02017-05-07

### Community

Maintainers

![](https://www.gravatar.com/avatar/5dc2e34302265b87bcbef211ffb061b589b7e56f699b9972abca7f5691e524d5?d=identicon)[carlosocarvalho](/maintainers/carlosocarvalho)

---

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 (6 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/carlosocarvalho-eloquent-codeigniter/health.svg)

```
[![Health](https://phpackages.com/badges/carlosocarvalho-eloquent-codeigniter/health.svg)](https://phpackages.com/packages/carlosocarvalho-eloquent-codeigniter)
```

###  Alternatives

[expressodev/laravel-codeigniter-db

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

314.0k1](/packages/expressodev-laravel-codeigniter-db)[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)
