PHPackages                             datacreativa/laravel-presentable - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. datacreativa/laravel-presentable

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

datacreativa/laravel-presentable
================================

Create presenters for Eloquent Models

v1.4.0(10mo ago)7325.4k↓33.7%7MITPHPPHP ^8.2CI passing

Since Feb 21Pushed 3mo ago4 watchersCompare

[ Source](https://github.com/datacreativa/laravel-presentable)[ Packagist](https://packagist.org/packages/datacreativa/laravel-presentable)[ Docs](https://github.com/datacreativa/laravel-presentable)[ RSS](/packages/datacreativa-laravel-presentable/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (5)Dependencies (3)Versions (6)Used By (0)

Laravel Presentable
===================

[](#laravel-presentable)

[![Total Downloads](https://camo.githubusercontent.com/9402726d2b61beb24ee0fea4ad3805b7a8d3a4e95a0416f89c5fa18240f77cee/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6461746163726561746976612f6c61726176656c2d70726573656e7461626c652e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/datacreativa/laravel-presentable)[![GitHub Actions](https://github.com/datacreativa/laravel-presentable/actions/workflows/main.yml/badge.svg)](https://github.com/datacreativa/laravel-presentable/actions/workflows/main.yml/badge.svg)

[![Banner](https://camo.githubusercontent.com/be3749be2702f39615dfca0ddb25581863b7e2a46a3a7651db1489f3e263007f/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c25323050726573656e7461626c652e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6461746163726561746976612532466c61726176656c2d70726573656e7461626c65267061747465726e3d627562626c6573267374796c653d7374796c655f31266465736372697074696f6e3d4372656174652b70726573656e746572732b666f722b456c6f7175656e742b4d6f64656c73266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)](https://camo.githubusercontent.com/be3749be2702f39615dfca0ddb25581863b7e2a46a3a7651db1489f3e263007f/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f4c61726176656c25323050726573656e7461626c652e706e673f7468656d653d6c69676874267061636b6167654d616e616765723d636f6d706f7365722b72657175697265267061636b6167654e616d653d6461746163726561746976612532466c61726176656c2d70726573656e7461626c65267061747465726e3d627562626c6573267374796c653d7374796c655f31266465736372697074696f6e3d4372656174652b70726573656e746572732b666f722b456c6f7175656e742b4d6f64656c73266d643d312673686f7757617465726d61726b3d3126666f6e7453697a653d313030707826696d616765733d68747470732533412532462532466c61726176656c2e636f6d253246696d672532466c6f676f6d61726b2e6d696e2e737667)

This package allows the information to be presented in a different way by means of methods that can be defined in the model's presenter class.

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

[](#installation)

You can install the package via composer:

LaravelVersion6, 7, 81.0.091.1.0101.2.0111.3.0121.4.0131.5.0```
composer require datacreativa/laravel-presentable
```

Usage
-----

[](#usage)

Use the `HasPresentable` trait in any Eloquent Model, you must also add the `$presenter` property.

```
use App\Models\Presenters\UserPresenter;
use TheHiveTeam\Presentable\HasPresentable;

class User extends Model
{
    use HasPresentable;

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

You can generate a class presenter with this command:

```
php artisan make:presenter UserPresenter
```

In this class you can define any method, for example:

```
namespace App\Models\Presenters;

use TheHiveTeam\Presentable\Presenter;

class UserPresenter extends Presenter
{
    public function name()
    {
        return ucwords($this->model->name);
    }
}
```

Now you have available the `present()` method in Eloquent Model.

```
$user = (new User)->setAttribute('name', 'john doe');
$user->present()->name;
// John Doe
```

Enjoy it!

### Testing

[](#testing)

```
composer test
```

### Changelog

[](#changelog)

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

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Jonathan Zarate](https://github.com/zaratedev)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

50

—

FairBetter than 95% of packages

Maintenance69

Regular maintenance activity

Popularity41

Moderate usage in the ecosystem

Community15

Small or concentrated contributor base

Maturity62

Established project with proven stability

 Bus Factor1

Top contributor holds 61.9% 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 ~229 days

Total

5

Last Release

313d ago

PHP version history (3 changes)v1.0.0PHP ^8.1

v1.3.0PHP &gt;=7.2|^8.0

v1.4.0PHP ^8.2

### Community

Maintainers

![](https://www.gravatar.com/avatar/2c559b2600853d5043f93277c8f4866505ddfe5058f65ea0d541e04b71c91cf7?d=identicon)[zaratedev](/maintainers/zaratedev)

---

Top Contributors

[![ErickZH](https://avatars.githubusercontent.com/u/14044588?v=4)](https://github.com/ErickZH "ErickZH (13 commits)")[![zaratedev](https://avatars.githubusercontent.com/u/29809845?v=4)](https://github.com/zaratedev "zaratedev (6 commits)")[![laravel-shift](https://avatars.githubusercontent.com/u/15991828?v=4)](https://github.com/laravel-shift "laravel-shift (2 commits)")

---

Tags

hacktoberfestlaravelpackagepresentablelaravelpresentable

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/datacreativa-laravel-presentable/health.svg)

```
[![Health](https://phpackages.com/badges/datacreativa-laravel-presentable/health.svg)](https://phpackages.com/packages/datacreativa-laravel-presentable)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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