PHPackages                             borisnedovis/eloquent-presenter - 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. borisnedovis/eloquent-presenter

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

borisnedovis/eloquent-presenter
===============================

Presentation standard for Eloquent models

1.0.0(4y ago)12MITPHPPHP ^7.4

Since Jun 27Pushed 2y ago1 watchersCompare

[ Source](https://github.com/aaboris/eloquent-presenter)[ Packagist](https://packagist.org/packages/borisnedovis/eloquent-presenter)[ RSS](/packages/borisnedovis-eloquent-presenter/feed)WikiDiscussions master Synced today

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

Presenter for Eloquent models
=============================

[](#presenter-for-eloquent-models)

Install
-------

[](#install)

```
composer require borisnedovis/eloquent-presenter
```

Usage
-----

[](#usage)

Create presenter class and extend it from `aaboris\EloquentPresenter\AbstractPresenter`. And specify `$attributes` keys, which presenter should use from model:

```
namespace App\Presenters;

use BorisNedovis\EloquentPresenter\AbstractPresenter;

class UserPresenter extends AbstractPresenter
{
    /**
     * @var \App\Models\User
     */
    protected $model;

    protected $attributes = [
        'first_name',
        'last_name'
    ];
}
```

Additionally you can add method for getting specific values:

```
protected $attributes = [
    'first_name',
    'last_name',
    'full_name', // isBlocked()) {
            return \App\Presenters\BlockedUserPresenter::class;
        }

        return \App\Presenters\UserPresenter::class;
    }

}
```

And just send it to output:

```
$user = User::first();

return response()->json(compact('user'));
```

```
{
    "first_name": "Boris",
    "last_name": "Nedovis",
    "full_name": "Boris Nedovis",
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](https://github.com/BorisNedovis/eloquent-presenter/blob/master/LICENSE) for more information.

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity51

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

1780d ago

### Community

Maintainers

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

---

Top Contributors

[![aaboris](https://avatars.githubusercontent.com/u/54862404?v=4)](https://github.com/aaboris "aaboris (2 commits)")

---

Tags

laravelmodeleloquentpresenterdecorator

### Embed Badge

![Health badge](/badges/borisnedovis-eloquent-presenter/health.svg)

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

###  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)[dyrynda/laravel-model-uuid

This package allows you to easily work with UUIDs in your Laravel models.

4802.8M8](/packages/dyrynda-laravel-model-uuid)[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)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)

PHPackages © 2026

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