PHPackages                             wongyip/laravel-renderable - 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. wongyip/laravel-renderable

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

wongyip/laravel-renderable
==========================

Render Eloquent model with ease.

v1.3.6(1mo ago)01.7kPHPPHP &gt;=8.2

Since Dec 6Pushed 8mo ago1 watchersCompare

[ Source](https://github.com/wongyip/laravel-renderable)[ Packagist](https://packagist.org/packages/wongyip/laravel-renderable)[ Docs](https://github.com/wongyip/laravel-renderable)[ RSS](/packages/wongyip-laravel-renderable/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (58)Used By (0)

Laravel Renderable
==================

[](#laravel-renderable)

Present an Eloquent model or an associative array in HTML table view.

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

[](#installation)

*Install as a package to a Laravel project*

```
composer require wongyip/laravel-rendetable

```

Usage
-----

[](#usage)

```
use Wongyip\Laravel\Renderable\Renderable;

// Attributes to be rendered, can be an Eloquent model.
$user = [
    'id' => 1999,
    'surname' => 'SOME',
    'last_name' => 'Body',
    'roles' => ['Operator', 'Editor', 'Supervisor'],
    'gender' => 'Male',
    'birthday' => '29th Feb',
    'active' => false
];

// Render all attributes except 'gender' and 'birthday'.
$included = true;
$excluded = ['gender', 'birthday'];

// Custom Labels
$labels = [
    'surname' => 'First Name',
    'active' => 'Status'
];

// Make
$r = Renderable::table($user, $included, $excluded);

// Render as , expected array value.
$r->typeUL('roles');

// Print 'Active' and 'Blocked' when attribute 'active' is TRUE and FALSE respectively.
$r->typeBool('active', 'Active', 'Blocked');

// Overwrite auto-generated labels.
$r->labels($labels);

// To HTML.
echo $r->render();
```

### Output

[](#output)

```

                Field
                Value

                ID
                1999

                First Name
                SOME

                Last Name
                Body

                Roles

                        Operator
                        Editor
                        Supervisor

                Status
                Blocked

```

Output Explained
----------------

[](#output-explained)

- The main output is a `` tag wrapped in a container `` tag.
- The `Renderable` object generates its own `Renderable.id` randomly on instantiate (`12345678`), which is changeable with the `Renderable.id()` method.
- The main tag will have an `id` attribute derived from the `Renderable.id`, prefixed with `renderable-` by default, configurable via `/config/renderable.php`) and changeable on run-time by updating the `Renderable.options.idPrefix` property.
- The container tag's ID is further suffixed with `-containter` by default, configurable via `/config/renderable.php`) and changeable on run-time by updating the `Renderable.options.containerIdSuffix` property.
- Field labels and values are rendered base on the setup.

Notes
-----

[](#notes)

- Output is formatted with [HTML Beautify](https://github.com/wongyip/html-beautify).
- Output is sanitized with [HTML Purifier](https://github.com/ezyang/htmlpurifier).
- The `Renderable` object is designed to render once only, use `clone` keyword to create multiple `Renderable` objects may end up fall into the variable referencing nightmare, do [Deep Copy](https://github.com/myclabs/DeepCopy) if multiple instance is really needed.

###  Health Score

48

—

FairBetter than 94% of packages

Maintenance73

Regular maintenance activity

Popularity18

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity76

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

Recently: every ~74 days

Total

57

Last Release

47d ago

Major Versions

v0.12.0 → v1.0.02024-04-10

PHP version history (4 changes)v0.0.1PHP &gt;=7.0.0

v0.8.0PHP &gt;=8.2.0

v1.1.4PHP &gt;=8.1

v1.3.0PHP &gt;=8.2

### Community

Maintainers

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

---

Top Contributors

[![wongyip](https://avatars.githubusercontent.com/u/9350540?v=4)](https://github.com/wongyip "wongyip (35 commits)")

### Embed Badge

![Health badge](/badges/wongyip-laravel-renderable/health.svg)

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

###  Alternatives

[grumpydictator/firefly-iii

Firefly III: a personal finances manager.

22.8k69.3k](/packages/grumpydictator-firefly-iii)[wireui/wireui

TallStack components

1.8k1.3M16](/packages/wireui-wireui)[livewire/volt

An elegantly crafted functional API for Laravel Livewire.

4195.3M84](/packages/livewire-volt)[civicrm/civicrm-core

Open source constituent relationship management for non-profits, NGOs and advocacy organizations.

728272.9k17](/packages/civicrm-civicrm-core)[ramonrietdijk/livewire-tables

Dynamic tables for models with Laravel Livewire

21147.4k](/packages/ramonrietdijk-livewire-tables)

PHPackages © 2026

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