PHPackages                             alxarafe/resource-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. alxarafe/resource-eloquent

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

alxarafe/resource-eloquent
==========================

Eloquent ORM adapter for alxarafe/resource-controller. Implements RepositoryContract, QueryContract, and TransactionContract using Illuminate Database.

0.1.2(1mo ago)01001GPL-3.0-or-laterPHPPHP ^8.2CI passing

Since Apr 22Pushed 1mo agoCompare

[ Source](https://github.com/alxarafe/resource-eloquent)[ Packagist](https://packagist.org/packages/alxarafe/resource-eloquent)[ RSS](/packages/alxarafe-resource-eloquent/feed)WikiDiscussions main Synced 1w ago

READMEChangelogDependencies (6)Versions (4)Used By (1)

alxarafe/resource-eloquent
==========================

[](#alxaraferesource-eloquent)

[![PHP Version](https://camo.githubusercontent.com/0850ed948ac3ac730f3c66764c4e21ea1163f0b76bf9624c97c8c0be7af8f050/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c756576696f6c65743f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/0850ed948ac3ac730f3c66764c4e21ea1163f0b76bf9624c97c8c0be7af8f050/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5048502d382e322b2d626c756576696f6c65743f7374796c653d666c61742d737175617265)[![CI](https://github.com/alxarafe/resource-eloquent/actions/workflows/ci.yml/badge.svg)](https://github.com/alxarafe/resource-eloquent/actions/workflows/ci.yml/badge.svg)[![Tests](https://github.com/alxarafe/resource-eloquent/actions/workflows/tests.yml/badge.svg)](https://github.com/alxarafe/resource-eloquent/actions/workflows/tests.yml/badge.svg)[![Static Analysis](https://camo.githubusercontent.com/949a823ae3b18f7450026518eb003044528051afb988a983a5b9d5f64cf48f40/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461746963253230616e616c797369732d5048505374616e2532302532422532305073616c6d2d626c75653f7374796c653d666c61742d737175617265)](https://camo.githubusercontent.com/949a823ae3b18f7450026518eb003044528051afb988a983a5b9d5f64cf48f40/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f737461746963253230616e616c797369732d5048505374616e2532302532422532305073616c6d2d626c75653f7374796c653d666c61742d737175617265)[![PRs Welcome](https://camo.githubusercontent.com/dd0b24c1e6776719edb2c273548a510d6490d8d25269a043dfabbd38419905da/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f5052732d77656c636f6d652d627269676874677265656e2e737667)](https://github.com/alxarafe/resource-eloquent/issues)

**Eloquent ORM adapter for alxarafe/resource-controller.**

Implements `RepositoryContract`, `QueryContract`, and `TransactionContract` using Illuminate Database.

Ecosystem
---------

[](#ecosystem)

PackagePurposeStatus**[resource-controller](https://github.com/alxarafe/resource-controller)**Core CRUD engine + UI components✅ Stable**[resource-eloquent](https://github.com/alxarafe/resource-eloquent)**Eloquent ORM adapter✅ Stable**[resource-blade](https://github.com/alxarafe/resource-blade)**Blade template renderer adapter✅ Stable**[resource-twig](https://github.com/alxarafe/resource-twig)**Twig template renderer adapter✅ StableInstallation
------------

[](#installation)

```
composer require alxarafe/resource-eloquent
```

This will automatically install `alxarafe/resource-controller` and `illuminate/database`.

Usage
-----

[](#usage)

```
use Alxarafe\ResourceController\AbstractResourceController;
use Alxarafe\ResourceController\Contracts\RepositoryContract;
use Alxarafe\ResourceController\Contracts\TransactionContract;
use Alxarafe\ResourceEloquent\EloquentRepository;
use Alxarafe\ResourceEloquent\EloquentTransaction;
use App\Models\Product; // Your Eloquent model

class ProductController extends AbstractResourceController
{
    // ... basic controller configuration ...

    protected function getRepository(string $tabId = 'default'): RepositoryContract
    {
        return new EloquentRepository(Product::class);
    }

    protected function getTransaction(): TransactionContract
    {
        // Get the DB connection from Laravel or Capsule
        return new EloquentTransaction(\Illuminate\Support\Facades\DB::connection());
    }
}
```

Features
--------

[](#features)

- Translates declarative field filtering and querying to Eloquent queries.
- Manages pagination automatically.
- Handles simple and compound database transactions seamlessly.
- Converts Eloquent metadata directly into Resource Controller configurations.

Development
-----------

[](#development)

### Docker

[](#docker)

```
docker compose up -d
docker exec alxarafe-resources composer install
```

### Running the CI pipeline locally

[](#running-the-ci-pipeline-locally)

```
bash bin/ci_local.sh
```

### Running tests only

[](#running-tests-only)

```
bash bin/run_tests.sh
```

License
-------

[](#license)

GPL-3.0-or-later

###  Health Score

38

—

LowBetter than 83% of packages

Maintenance91

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity38

Early-stage or recently created project

 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

Every ~3 days

Total

3

Last Release

42d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/4c3ef5787a3dd8f75636a6ab83a70d752c7f3f6cb71fe8e8b630e93b85ccd081?d=identicon)[rsanjoseo](/maintainers/rsanjoseo)

---

Top Contributors

[![rsanjoseo](https://avatars.githubusercontent.com/u/27363683?v=4)](https://github.com/rsanjoseo "rsanjoseo (9 commits)")

---

Tags

ormeloquentadaptercrudilluminateresource controller

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan, Psalm

Code StylePHP\_CodeSniffer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/alxarafe-resource-eloquent/health.svg)

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

###  Alternatives

[kirschbaum-development/eloquent-power-joins

The Laravel magic applied to joins.

1.6k29.9M42](/packages/kirschbaum-development-eloquent-power-joins)[cybercog/laravel-love

Make Laravel Eloquent models reactable with any type of emotions in a minutes!

1.2k322.4k1](/packages/cybercog-laravel-love)[dbout/wp-orm

WordPress ORM with Eloquent.

12910.2k1](/packages/dbout-wp-orm)[ymigval/laravel-model-cache

Laravel package for caching Eloquent model queries

7955.4k4](/packages/ymigval-laravel-model-cache)[ntanduy/cloudflare-d1-database

Cloudflare D1 database driver for Laravel — full Eloquent &amp; Query Builder support.

246.8k](/packages/ntanduy-cloudflare-d1-database)[chocofamilyme/laravel-tarantool

A Tarantool based Eloquent ORM and Query builder for Laravel

182.3k](/packages/chocofamilyme-laravel-tarantool)

PHPackages © 2026

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