PHPackages                             nafisc/simple-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. nafisc/simple-eloquent

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

nafisc/simple-eloquent
======================

A wrapper for Eloquent directed at simpler implementations.

v1.0(7y ago)12MITPHPPHP &gt;=7.1

Since Jan 10Pushed 7y ago1 watchersCompare

[ Source](https://github.com/nathan-fiscaletti/simple-eloquent)[ Packagist](https://packagist.org/packages/nafisc/simple-eloquent)[ RSS](/packages/nafisc-simple-eloquent/feed)WikiDiscussions master Synced yesterday

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

Simple Eloquent
===============

[](#simple-eloquent)

> SimpleEloquent is a wrapper around Eloquent that makes common practices a little easier.

[![StyleCI](https://camo.githubusercontent.com/f0bc347d7bc39c26e722744ba5cb28a11c975efd19e4fdacac05137854f39c72/68747470733a2f2f7374796c6563692e696f2f7265706f732f3136333930323639342f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/163902694)[![Latest Stable Version](https://camo.githubusercontent.com/199fb1fd173678879f465579e19f8a967592e63d65ae5993238b03837b9aaa2e/68747470733a2f2f706f7365722e707567782e6f72672f6e61666973632f73696d706c652d656c6f7175656e742f762f737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/nafisc/simple-eloquent)[![Total Downloads](https://camo.githubusercontent.com/04ceaa3c15d27b23947a729ede2149116c35bb840f6f395a77ba4699882bc536/68747470733a2f2f706f7365722e707567782e6f72672f6e61666973632f73696d706c652d656c6f7175656e742f646f776e6c6f6164733f666f726d61743d666c6174)](https://packagist.org/packages/nafisc/simple-eloquent)[![Latest Unstable Version](https://camo.githubusercontent.com/fa7059e9c2d315287562771961ad3120ceb880607b3e01aae142c42458c38f43/68747470733a2f2f706f7365722e707567782e6f72672f6e61666973632f73696d706c652d656c6f7175656e742f762f756e737461626c653f666f726d61743d666c6174)](https://packagist.org/packages/nafisc/simple-eloquent)[![License](https://camo.githubusercontent.com/3cad6e1b8bcbf35c800245b6a9b9468da969cfc03ba4ea20b54dd8a061e5e46b/68747470733a2f2f706f7365722e707567782e6f72672f6e61666973632f73696d706c652d656c6f7175656e742f6c6963656e73653f666f726d61743d666c6174)](https://packagist.org/packages/nafisc/simple-eloquent)

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

[](#installation)

SimpleEloquent is available through composer.

```
composer require nafisc/simple-eloquent

```

Usage
-----

[](#usage)

### Initializing a Connection

[](#initializing-a-connection)

```
    use \SimpleEloquent\Connection;

    $connection = Connection::set (

        // Connection Name
        'test',

        // Configuration
        [
            'driver'    => 'mysql',
            'host'      => 'localhost',
            'database'  => 'test',
            'username'  => 'root',
            'password'  => 'password',
        ]

    );
```

### Executing Sql / Accessing Eloquent Connection

[](#executing-sql--accessing-eloquent-connection)

```
    // Retrieve the Connection
    $connection = Connection::get('test');

    // Execute some Sql
    $result = $connection->select('SELECT * FROM `servers` LIMIT 1');
    $server = $result[0];
    echo $server->ipv4.PHP_EOL;

    . . .

    // Alternately, you can access the eloquent
    // connection object directly.
    $connection = Connection::get('test')->eloquentConnection();
    $result = $connection->select('SELECT * FROM `servers` LIMIT 1');
```

### Using Models

[](#using-models)

```
    // Retrieve the connection.
    $connection = Connection::get('test');

    // Create a new model for the table 'servers'.
    // See \SimpleEloquent\Connection@model function for more documentation.
    $model = $connection->model('servers');

    // Retrieve a result.
    $result = $model->where('id', 2)->first();
    echo $result->ipv4.PHP_EOL;
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

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

2679d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/663ed2be1317f25f09a19e22b0ca8b0d33c3a5838267693f9848902a41e047b5?d=identicon)[nathan-fiscaletti](/maintainers/nathan-fiscaletti)

### Embed Badge

![Health badge](/badges/nafisc-simple-eloquent/health.svg)

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

###  Alternatives

[mongodb/laravel-mongodb

A MongoDB based Eloquent model and Query builder for Laravel

7.1k7.2M71](/packages/mongodb-laravel-mongodb)[owen-it/laravel-auditing

Audit changes of your Eloquent models in Laravel

3.4k33.0M95](/packages/owen-it-laravel-auditing)[dyrynda/laravel-cascade-soft-deletes

Cascading deletes for Eloquent models that implement soft deletes

1.2k3.1M5](/packages/dyrynda-laravel-cascade-soft-deletes)[tightenco/parental

A simple eloquent trait that allows relationships to be accessed through child models.

1.5k1.8M5](/packages/tightenco-parental)[watson/validating

Eloquent model validating trait.

9723.3M47](/packages/watson-validating)[cybercog/laravel-ban

Laravel Ban simplify blocking and banning Eloquent models.

1.1k651.8k11](/packages/cybercog-laravel-ban)

PHPackages © 2026

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