PHPackages                             a2design/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. [Framework](/categories/framework)
4. /
5. a2design/eloquent-presenter

Abandoned → [faustbrian/eloquent-presenter](/?search=faustbrian%2Feloquent-presenter)Library[Framework](/categories/framework)

a2design/eloquent-presenter
===========================

Model Presenters for Laravel

2.1.0(9y ago)0162MITPHPPHP ^5.5 || ^7.0

Since Nov 4Pushed 9y ago4 watchersCompare

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

READMEChangelogDependencies (7)Versions (8)Used By (0)

Eloquent Presenter
==================

[](#eloquent-presenter)

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

[](#installation)

Require this package, with [Composer](https://getcomposer.org/), in the root directory of your project.

```
$ composer require faustbrian/eloquent-presenter
```

Usage
-----

[](#usage)

### Presenter

[](#presenter)

```
use BrianFaust\Presenter\BasePresenter;

class CommentPresenter extends BasePresenter
{
    public function getRoutePrefix()
    {
        return 'users.posts.comments';
    }

    public function getRouteParameters()
    {
        // The ID of the model will be automatically attached to this array at the end
        // [
        //     $model->post->user->id,
        //     $model->post->id,
        //     $model->id // "id" is what is specified in $this->getRouteKeyName()
        // ];

        return ['post.user.id', 'post.id'];
    }
}
```

### Model

[](#model)

```
use BrianFaust\Presenter\HasViewPresenterTrait;
use Illuminate\Database\Eloquent\Model;

class Comment extends Model
{
    use HasViewPresenterTrait;

    /**
     * Get the view presenter for the model.
     *
     * @return string
     */
    protected function getPresenter()
    {
        return UserPresenter::class;
    }
}
```

Security
--------

[](#security)

If you discover a security vulnerability within this package, please send an e-mail to Brian Faust at . All security vulnerabilities will be promptly addressed.

License
-------

[](#license)

The [The MIT License (MIT)](LICENSE). Please check the [LICENSE](LICENSE) file for more details.

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~2 days

Total

7

Last Release

3508d ago

Major Versions

1.0.0 → 2.0.02016-11-08

PHP version history (2 changes)1.0.0PHP ^5.6 || ^7.0

2.1.0PHP ^5.5 || ^7.0

### Community

Maintainers

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

---

Top Contributors

[![faustbrian](https://avatars.githubusercontent.com/u/22145591?v=4)](https://github.com/faustbrian "faustbrian (18 commits)")

---

Tags

frameworklaravelBrian Faustfaustbrianeloquent-presenter

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[laravel/framework

The Laravel Framework.

34.8k532.1M19.4k](/packages/laravel-framework)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.5k28.4M137](/packages/laravel-cashier)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k14.1M124](/packages/laravel-pulse)[laravel/horizon

Dashboard and code-driven configuration for Laravel queues.

4.1k91.3M282](/packages/laravel-horizon)[bagisto/bagisto

Bagisto Laravel E-Commerce

27.6k169.0k9](/packages/bagisto-bagisto)[laravel/octane

Supercharge your Laravel application's performance.

4.0k24.7M205](/packages/laravel-octane)

PHPackages © 2026

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