PHPackages                             tequilarapido/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. [Templating &amp; Views](/categories/templating)
4. /
5. tequilarapido/presenter

ActiveLibrary[Templating &amp; Views](/categories/templating)

tequilarapido/presenter
=======================

Simple and straightforward presenter implementation for Eloquent models.

v1.1.5(6y ago)012.9k↓92.2%[1 PRs](https://github.com/tequilarapido/presenter/pulls)MITPHP

Since Oct 14Pushed 5y ago3 watchersCompare

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

READMEChangelog (5)Dependencies (2)Versions (15)Used By (0)

Simple and straightforward presenter implementation for Eloquent models.

[![Latest Version on Packagist](https://camo.githubusercontent.com/668728e5a765fb5ae55cb2ad3bb2b93e1179975aea581aa8ff97addb8d88c717/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f74657175696c6172617069646f2f70726573656e7465722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/tequilarapido/presenter)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)[![Build Status](https://camo.githubusercontent.com/11450af272237c6675e0459c9705e53224236c49555ad616893b159d02187dae/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f74657175696c6172617069646f2f70726573656e7465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/tequilarapido/presenter)[![StyleCI](https://camo.githubusercontent.com/a8d2fe6fe8eac7c0d41a1103577f0d24870343c20730b2e748f3cc2912a220d3/68747470733a2f2f7374796c6563692e696f2f7265706f732f37303931373936312f736869656c64)](https://styleci.io/repos/70917961)[![SensioLabsInsight](https://camo.githubusercontent.com/6bf0593801b651881cd9b2f3d13aba5756a167c9d64e5e7be8e253437dc1b0ef/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f39363061633461302d666630382d343464662d623234372d6136643231323030383130662e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/960ac4a0-ff08-44df-b247-a6d21200810f)[![Quality Score](https://camo.githubusercontent.com/ea56301448980ff16b975c5ba195d796e45c3d8bb2454e2f8012c5be7b8e5d22/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f672f74657175696c6172617069646f2f70726573656e7465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tequilarapido/presenter)[![Code Coverage](https://camo.githubusercontent.com/976f0407d1db57b97f4851e6e0c2ac39dfe905b402f92993d96efc5ddaa8d5f6/68747470733a2f2f696d672e736869656c64732e696f2f7363727574696e697a65722f636f7665726167652f672f74657175696c6172617069646f2f70726573656e7465722f6d61737465722e7376673f7374796c653d666c61742d737175617265)](https://scrutinizer-ci.com/g/tequilarapido/presenter/?branch=master)

 [![](https://camo.githubusercontent.com/b49705c41e1d23edb4ca463fa26213e743ce371bd72ace1d3094c34d6c81de8f/68747470733a2f2f7331362e706f7374696d672e6f72672f7371327661386d6e702f70726573656e7465722e6a7067)](https://camo.githubusercontent.com/b49705c41e1d23edb4ca463fa26213e743ce371bd72ace1d3094c34d6c81de8f/68747470733a2f2f7331362e706f7374696d672e6f72672f7371327661386d6e702f70726573656e7465722e6a7067)

Contents
--------

[](#contents)

- [Installation](#installation)
- [Usage](#usage)
- [Changelog](#changelog)
- [Testing](#testing)
- [Security](#security)
- [Contributing](#contributing)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

You can install the package using composer

```
$ composer require tequilarapido/presenter
```

Usage
-----

[](#usage)

Let's assume we have a User model class

```
class User extends Model {
   protected $fillables = ['first_name', 'last_name'];
}
```

- 1/ Create a presenter class like the following, and add presentation methods to it. For the example, we'll make a method that will return the user full name.

```
use Tequilarapido\Presenter\Presenter;

class UserPresenter extends Presenter {
     public function name()
     {
        return $this->first_name . ' ' . $this->last_name;
     }
}
```

> We can access model property directly inside the presenter class. We can also access them via the $model property

```
$this->first_name
// or
$this->model->first_name
// or
$this->model->getAttribute('first_name')
```

- 2/ you need to reference this class in the model using a public `$presenter` property and use the `Prensentable` trait.

```
use Tequilarapido\Presenter\Presentable;

class User extends Model {
    use Presentable;

   protected $fillables = ['first_name', 'last_name'];

   public $presenter = UserPresenter::class;
}
```

- 3/ You can than get the presented value like so :

```
$user = User::find(1);

// Retreive as property
$user->present()->name

// you can alse call the method
$user->present()->name()
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Testing
-------

[](#testing)

```
$ composer test
```

Security
--------

[](#security)

If you discover any security related issues, please email :author\_email instead of using the issue tracker.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Nassif Bourguig](https://github.com/nbourguig)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity21

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity71

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

Recently: every ~45 days

Total

12

Last Release

2313d ago

Major Versions

0.0.1 → 1.0.02017-01-25

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/276832?v=4)[Nassif Bourguig](/maintainers/nbourguig)[@nbourguig](https://github.com/nbourguig)

---

Top Contributors

[![nbourguig](https://avatars.githubusercontent.com/u/276832?v=4)](https://github.com/nbourguig "nbourguig (30 commits)")

### Embed Badge

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

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

###  Alternatives

[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[api-platform/laravel

API Platform support for Laravel

58171.5k14](/packages/api-platform-laravel)[ecotone/laravel

Ecotone for Laravel — CQRS, Event Sourcing, Sagas, Durable Workflows, and Outbox on top of Laravel Queue, via PHP attributes.

21318.6k3](/packages/ecotone-laravel)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)

PHPackages © 2026

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