PHPackages                             zeuxisoo/slim-eloquent - 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. zeuxisoo/slim-eloquent

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

zeuxisoo/slim-eloquent
======================

PHP laravel eloquent on slim framework

0.1.0(10y ago)51.3kBSD-2-ClausePHP

Since May 27Pushed 10y ago1 watchersCompare

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

READMEChangelogDependencies (3)Versions (2)Used By (0)

Installing
----------

[](#installing)

- Install the composer

```
curl -sS https://getcomposer.org/installer | php

```

- Edit composer.json

```
{
    "require": {
        "zeuxisoo/slim-eloquent": "0.1.0"
    }
}

```

- Install/update your dependencies

```
php composer.phar install

```

Usage
-----

[](#usage)

- Create database config

```
$app->config('databases', [
    'default' => [
        'driver'    => 'mysql',
        'host'      => 'localhost',
        'database'  => 'production',
        'username'  => 'root',
        'password'  => '',
        'charset'   => 'utf8',
        'collation' => 'utf8_general_ci',
        'prefix'    => ''
    ]
]);

```

- Add the middleware into slim application

```
$app->add(new Zeuxisoo\Laravel\Database\Eloquent\ModelMiddleware);

```

Note
----

[](#note)

- If you want multiple database connection, you can change the config like:

```
$app->config('databases', [
    'default' => [
       'driver'    => 'mysql',
       'host'      => 'localhost',
       'database'  => 'production',
       'username'  => 'root',
       'password'  => '',
       'charset'   => 'utf8',
       'collation' => 'utf8_general_ci',
       'prefix'    => ''
   ],
   'testing' => [
       'driver'    => 'mysql',
       'host'      => 'localhost',
       'database'  => 'testing',
       'username'  => 'root',
       'password'  => '',
       'charset'   => 'utf8',
       'collation' => 'utf8_general_ci',
       'prefix'    => ''
   ]
]);

```

- In the application, You can set the connection like:

```
// Default connection
$connectionDefault     = $app->db->getConnection();
$connectionDefaultUser = $connectionDefault->table('user')->find(1);

// Testing connection
$connectionTesting     = $app->db->getConnection('testing');
$connectionTestingUser = $connectionTesting->table('user')->find(1);

// Model like
$modelDefaultUser = User::find(1);
$modelTestingUser = User::on('testing')->find(1);

```

Want more information? Please see the `examples` directory.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 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

Unknown

Total

1

Last Release

4010d ago

### Community

Maintainers

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

---

Top Contributors

[![zeuxisoo](https://avatars.githubusercontent.com/u/322299?v=4)](https://github.com/zeuxisoo "zeuxisoo (11 commits)")

---

Tags

laraveldatabaseslimmodeleloquent

### Embed Badge

![Health badge](/badges/zeuxisoo-slim-eloquent/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)[spiritix/lada-cache

A Redis based, automated and scalable database caching layer for Laravel

591444.8k2](/packages/spiritix-lada-cache)[pdphilip/elasticsearch

An Elasticsearch implementation of Laravel's Eloquent ORM

145360.2k4](/packages/pdphilip-elasticsearch)[mvanduijker/laravel-model-exists-rule

Validation rule to check if a model exists

22194.5k1](/packages/mvanduijker-laravel-model-exists-rule)

PHPackages © 2026

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