PHPackages                             vanetten/dynamictable - 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. vanetten/dynamictable

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

vanetten/dynamictable
=====================

A simple PHP class to generate dynamic HTML tables from a multidimensional associative array.

v1.0.5(1y ago)043MITPHP

Since Aug 30Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mvanetten/DynamicTable)[ Packagist](https://packagist.org/packages/vanetten/dynamictable)[ RSS](/packages/vanetten-dynamictable/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)DependenciesVersions (3)Used By (0)

DynamicTable v1.0.5
===================

[](#dynamictable-v105)

A simple PHP class to generate dynamic HTML tables from a multidimensional associative array. This class provides various methods to manipulate table headers, add custom columns, and style the table with CSS classes.

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

[](#installation)

```
composer require vanetten/dynamictable
```

Basic Usage
-----------

[](#basic-usage)

```

```

> output

idnameagecity0Henry42Boulder1Ned40Los Angeles2Delilah43ChicagoBasic Usage in Laravel
----------------------

[](#basic-usage-in-laravel)

> Open the view and convert the Eloquent\\Collection to an Array; see example below.

```
$dt = new \VanEtten\DynamicTable($user->posts->toArray());
echo $dt->render();
```

Advanced Example
----------------

[](#advanced-example)

You can chain multiple methods to manipulate the table headers and add custom columns:

```
# In the addHeader method, use {{ }} to reference any existing key.

$dt->renameHeaders(['name' => 'Full Name'])
    ->addHeader(['Action' => 'Delete]')
    ->headerToUpperCase()
    ->excludeHeaders('id')
    ->addTableClass('table-class')
    ->addHeaderClass('header-class')
    ->addBodyClass('body-class');
```

> output

FULL NAMEAGECITYACTIONHenry42Boulder[Delete](delete.php?id=0)Ned40Los Angeles[Delete](delete.php?id=1)Delilah43Chicago[Delete](delete.php?id=2)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity40

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

Total

2

Last Release

625d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/6c60f143ad9797dd9bfe65975c617896bbe3205f9f8468df441eb5a170223e74?d=identicon)[mvanetten](/maintainers/mvanetten)

---

Top Contributors

[![mvanetten](https://avatars.githubusercontent.com/u/3913202?v=4)](https://github.com/mvanetten "mvanetten (49 commits)")

---

Tags

laravelhtmlgeneratorstabledynamicdynamictable

### Embed Badge

![Health badge](/badges/vanetten-dynamictable/health.svg)

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

###  Alternatives

[okipa/laravel-table

Generate tables from Eloquent models.

56752.8k](/packages/okipa-laravel-table)[gbrock/laravel-table

Table functionality for Laravel models

7644.3k](/packages/gbrock-laravel-table)[orchestra/html

HTML Component for Orchestra Platform

40112.6k2](/packages/orchestra-html)[digital-creative/conditional-container

Provides an easy way to conditionally show and hide fields in your Nova resources.

116593.8k4](/packages/digital-creative-conditional-container)[summerblue/generator

Extend Laravel's generators scaffold.

34139.9k](/packages/summerblue-generator)

PHPackages © 2026

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