PHPackages                             bluora/laravel-html-generator - 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. bluora/laravel-html-generator

Abandoned → [hnhdigital-os/laravel-html-generator](/?search=hnhdigital-os%2Flaravel-html-generator)Library

bluora/laravel-html-generator
=============================

2.0.1(4y ago)2229MITPHPPHP ^7.3CI failing

Since Dec 18Pushed 2y agoCompare

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

READMEChangelog (10)Dependencies (5)Versions (13)Used By (0)

Laravel Html Generator
======================

[](#laravel-html-generator)

[![Latest Stable Version](https://camo.githubusercontent.com/ba7f787852c99a9fde806f840e1479c6fb967052f142c5ff3140e562611991d3/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d68746d6c2d67656e657261746f722f762f737461626c652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-html-generator) [![Total Downloads](https://camo.githubusercontent.com/97fbd533c61cb223bf86b7fda1769c80309c8b712bee3e9dae238783331086a3/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d68746d6c2d67656e657261746f722f646f776e6c6f6164732e737667)](https://packagist.org/packages/hnhdigital-os/laravel-html-generator) [![Latest Unstable Version](https://camo.githubusercontent.com/11289a62e9f5eb2c48edd985beb8b8c0fd9a407468ceacc513601370e52973cb/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d68746d6c2d67656e657261746f722f762f756e737461626c652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-html-generator) [![License](https://camo.githubusercontent.com/21aef84e0e73ebf2a01bc9f0652b76a475aacf08a47b0374d74abe24cc4c33f0/68747470733a2f2f706f7365722e707567782e6f72672f686e686469676974616c2d6f732f6c61726176656c2d68746d6c2d67656e657261746f722f6c6963656e73652e737667)](https://packagist.org/packages/hnhdigital-os/laravel-html-generator)

Create HTML tags and render them efficiently.

Extends upon [Airmanbzh/php-html-generator](https://github.com/Airmanbzh/php-html-generator) with some Laravel related integration.

Overview
--------

[](#overview)

```
return HtmlTag::createElement();
// returns an empty HtmlTag Container

return HtmlTag::createElement('a');
// returns an HtmlTag containing a 'a' tag

```

### Why you should use it

[](#why-you-should-use-it)

- it always generates valid HTML and XHTML code
- it makes templates cleaner
- it's easy to use and fast to execute

Render tags
-----------

[](#render-tags)

```
echo(HtmlTag::createElement('a'));

```

### Simple tags

[](#simple-tags)

```
echo $html->tag('div')
//

echo(HtmlTag::createElement('p')->text('some content'));
// some content

```

### Structured tags

[](#structured-tags)

```
echo(HtmlTag::createElement('div')->addElement('a')->text('a text'));
// a text

$container = HtmlTag::createElement('div');
$container->addElement('p')->text('a text');
$container->addElement('a')->text('a link');
// a texta link

```

### Attributes

[](#attributes)

#### Classics attributes (method : 'set')

[](#classics-attributes-method--set)

```
$tag = $html->tag('a')
    ->set('href','./sample.php')
    ->set('id','myID')
    ->text('my link');
echo( $tag );
// my link

```

#### ID (method : 'id')

[](#id-method--id)

```
$tag = $html->tag('div')
    ->id('myID');
echo( $tag );
// my link

```

#### Class management (method : 'addClass'/'removeClass')

[](#class-management-method--addclassremoveclass)

```
$tag = $html->tag('div')
    ->addClass('firstClass')
    ->addClass('secondClass')
    ->text('my content')
    ->removeClass('firstClass');
echo( $tag );
// my content

```

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

[](#contributing)

Please see [CONTRIBUTING](https://github.com/hnhdigital-os/laravel-html-generator/blob/master/CONTRIBUTING.md) for details.

Credits
-------

[](#credits)

- [Rocco Howard](https://github.com/therocis)
- [Lucas Mezêncio](https://github.com/lucasmezencio)
- [All Contributors](https://github.com/hnhdigital-os/laravel-html-generator/contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](https://github.com/hnhdigital-os/laravel-html-generator/blob/master/LICENSE) for more information.

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 92.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 ~122 days

Recently: every ~179 days

Total

12

Last Release

1723d ago

Major Versions

1.1.1 → 2.0.02021-08-16

v1.x-dev → 2.0.12021-08-20

PHP version history (3 changes)1.0.0PHP &gt;=5.4.0

1.1.0PHP ^7.2

2.0.0PHP ^7.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/5270e3a3d1add4e39f12dfde3ce549999a26f759d7128056083ab07f475259f2?d=identicon)[bluora](/maintainers/bluora)

---

Top Contributors

[![RoccoHoward](https://avatars.githubusercontent.com/u/227896?v=4)](https://github.com/RoccoHoward "RoccoHoward (79 commits)")[![StyleCIBot](https://avatars.githubusercontent.com/u/11048387?v=4)](https://github.com/StyleCIBot "StyleCIBot (6 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/bluora-laravel-html-generator/health.svg)

```
[![Health](https://phpackages.com/badges/bluora-laravel-html-generator/health.svg)](https://phpackages.com/packages/bluora-laravel-html-generator)
```

###  Alternatives

[fumeapp/modeltyper

Generate TypeScript interfaces from Laravel Models

196277.9k](/packages/fumeapp-modeltyper)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)

PHPackages © 2026

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