PHPackages                             parker/laravel-betterhtml - 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. parker/laravel-betterhtml

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

parker/laravel-betterhtml
=========================

A better HtmlBuilder for Laravel 4 (including support for raw, non-escaped HTML and more tags)

0.1.0.x-dev(11y ago)06[1 issues](https://github.com/baileyparker/laravel-betterhtml/issues)MITPHPPHP &gt;=5.4.0

Since Sep 11Pushed 11y ago1 watchersCompare

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

READMEChangelogDependencies (2)Versions (2)Used By (0)

A Better `HtmlBuilder` for Laravel 4
====================================

[](#a-better-htmlbuilder-for-laravel-4)

> An expanded, backwards compatible `HtmlBuilder` for Laravel 4 which features raw HTML (and nesting builder methods), methods for [all HTML5 tags](https://developer.mozilla.org/en-US/docs/Web/Guide/HTML/HTML5/HTML5_element_list), convenience functions for common tasks like creating `` tags, and simple wrapping capabilities.

Usage
-----

[](#usage)

```
{{ Html::div(Html::linkAction('HomeController@index', 'Back to Home'), ['class' => 'home-link']) }}

{{ Html::nav(Html::ul([

    Html::linkAction('HomeController@index', 'Home'),
    Html::linkAction('AboutUsController@index', 'About Us'),
    Html::linkAction('BlogController@index', 'Blog'),
    Html::linkAction('ContactController@form', 'Contact Us'),

], ['class' => 'navigation-list'])) }}

```

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

[](#installation)

First, add the following line to `"require"` in your `composer.json`:

```
"parker/laravel-betterhtml": "~0.1"

```

Next, run `composer update` from the command line. After that, need to replace the following service provider in your `app.php` config file (feel free to comment it out):

```
'Illuminate\Html\HtmlServiceProvider',

```

with this:

```
'Parker\BetterHtml\Html\HtmlServiceProvider',

```

To be able to access Better HtmlBuilder with the `HTML` facade, you need to replace the following alias in your `app.php` config file (feel free to comment it out):

```
'HTML' => 'Illuminate\Support\Facades\HTML',

```

with this:

```
'HTML' => 'Parker\BetterHtml\Support\Facades\HTML',

```

Additionally, because of the way that Laravel's `e()` helper is defined and used (see [laravel/framework PR #4783](https://github.com/laravel/framework/pull/4783)), you also need to include BetterHtml's custom `e()` helper in your `app/start/global.php`:

```
/*
|--------------------------------------------------------------------------
| Load the Better HtmlBuilder helpers
|--------------------------------------------------------------------------
|
| Here we load helpers for the Better HtmlBuilder so that they can
| override ones provided by laravel in Illuminate\Support\helpers.php.
|
*/

$betterHtmlVendor = $app['path.base'] . '/vendor/parker/laravel-betterhtml';

require $betterHtmlVendor . '/src/Parker/BetterHtml/Support/helpers.php';

```

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

[](#contributing)

Do you know a way that we can make Laravel's `HtmlBuilder` even better? Please submit your ideas in the form of an issue on this repository with your proposal and a sample use case. Bug pull requests are greatly appreciated (but reports are fine too if you can't track down the cause yourself).

Requirements
------------

[](#requirements)

- PHP &gt;= 5.4.0
- Laravel 4.2

License
-------

[](#license)

BetterHtmlBuilder for Laravel 4 is open-sourced software licensed under the [MIT License](http://opensource.org/licenses/MIT).

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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

Unknown

Total

1

Last Release

4267d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/816a1c9d6ded822f26ad2a9695b2f22d1d676b6b6dffcb65948ea15276df96ec?d=identicon)[parker](/maintainers/parker)

---

Top Contributors

[![baileyparker](https://avatars.githubusercontent.com/u/7943649?v=4)](https://github.com/baileyparker "baileyparker (6 commits)")

### Embed Badge

![Health badge](/badges/parker-laravel-betterhtml/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.6k](/packages/craftcms-cms)[robsontenorio/mary

Gorgeous UI components for Livewire powered by daisyUI and Tailwind

1.5k454.7k15](/packages/robsontenorio-mary)[livewire/blaze

A tool for optimizing Blade component performance by folding them into parent templates

688221.3k17](/packages/livewire-blaze)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

44643.1k1](/packages/pressbooks-pressbooks)[rareloop/lumberjack-core

A powerful MVC framework for the modern WordPress developer. Write better, more expressive and easier to maintain code

42155.0k19](/packages/rareloop-lumberjack-core)[konekt/html

HTML and Form Builders for the Laravel Framework

24403.2k5](/packages/konekt-html)

PHPackages © 2026

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