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

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

yaro/presenter
==============

Eloquent models or arrays presenter for Laravel 5

0.3.0(5y ago)28.9k↓50%1MITPHP

Since Sep 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/Cherry-Pie/Presenter)[ Packagist](https://packagist.org/packages/yaro/presenter)[ RSS](/packages/yaro-presenter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (7)Dependencies (1)Versions (8)Used By (0)

Presenter for Eloquent models or arrays
=======================================

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

Install
-------

[](#install)

```
composer require yaro/presenter
```

Usage
-----

[](#usage)

Create presenter class and extend it from `Yaro\Presenter\AbstractPresenter`. And specify `$arrayable` keys, which presenter should use from model:

```
namespace App\Presenters;

use Yaro\Presenter\AbstractPresenter;

class UserPresenter extends AbstractPresenter
{
    protected $arrayable = [
        'name',
        'profession'
    ];
}
```

Additionally you can add method for getting specific values:

```
protected $arrayable = [
    'name',
    'profession',
    'random_number', // 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'));
```

```
{
    "name": "Davy Jones",
    "profession": "pirate",
    "random_number": 13
}
```

License
-------

[](#license)

The MIT License (MIT). Please see [LICENSE](https://github.com/Cherry-Pie/Presenter/blob/master/LICENSE) for more information.

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity26

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity58

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

Every ~210 days

Recently: every ~239 days

Total

7

Last Release

1911d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/337e05205184d845261f639b74255dedc7c3e75f069a38e79aa8083e91cf5a90?d=identicon)[Cherry Pie](/maintainers/Cherry%20Pie)

---

Top Contributors

[![Cherry-Pie](https://avatars.githubusercontent.com/u/3027596?v=4)](https://github.com/Cherry-Pie "Cherry-Pie (5 commits)")

---

Tags

laravelmodeleloquentpresenter

### Embed Badge

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

```
[![Health](https://phpackages.com/badges/yaro-presenter/health.svg)](https://phpackages.com/packages/yaro-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)
