PHPackages                             okipa/laravel-html-helper - 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. okipa/laravel-html-helper

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

okipa/laravel-html-helper
=========================

Useful helpers to dynamically generate clean HTML with Laravel.

2.0.0(5y ago)554.1k↑688.9%14MITPHPPHP ^7.4||^8.0

Since Jun 7Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Okipa/laravel-html-helper)[ Packagist](https://packagist.org/packages/okipa/laravel-html-helper)[ Docs](https://github.com/Okipa/laravel-html-helper)[ RSS](/packages/okipa-laravel-html-helper/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (10)Dependencies (5)Versions (14)Used By (4)

[![Laravel HTML Helper](/docs/laravel-html-helper.png)](/docs/laravel-html-helper.png)

 [ ![Latest Stable Version](https://camo.githubusercontent.com/4beac24d3cd70934cd63f51d4de429035375523759b8f2eefc7ea94a103b53a1/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f72656c656173652f4f6b6970612f6c61726176656c2d68746d6c2d68656c7065722e7376673f7374796c653d666c61742d737175617265) ](https://github.com/Okipa/laravel-html-helper/releases "Latest Stable Version") [ ![Total Downloads](https://camo.githubusercontent.com/3163a511cceb5e9309b21bb271377c5a76caeb41b320637fd65f9ab5f6186ca1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6f6b6970612f6c61726176656c2d68746d6c2d68656c7065722e7376673f7374796c653d666c61742d737175617265) ](https://packagist.org/packages/Okipa/laravel-html-helper "Total Downloads") [ ![Build Status](https://github.com/Okipa/laravel-html-helper/workflows/CI/badge.svg) ](https://github.com/Okipa/laravel-html-helper/actions "Build Status") [ ![Coverage Status](https://camo.githubusercontent.com/450fa7da980f2cd4cf4b46b2d18368588134049bf5c30557cc377e3fac3d81b7/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f4f6b6970612f6c61726176656c2d68746d6c2d68656c7065722f62616467652e7376673f6272616e63683d6d6173746572) ](https://coveralls.io/github/Okipa/laravel-html-helper?branch=master "Coverage Status") [ ![License: MIT](https://camo.githubusercontent.com/08cef40a9105b6526ca22088bc514fbfdbc9aac1ddbf8d4e6c750e3a88a44dca/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4c6963656e73652d4d49542d626c75652e737667) ](/LICENSE.md "License: MIT")

**⚠️ This package has been abandonned ⚠️**

Easily handle conditional HTML generation with the following helpers.

Found this package helpful? Please consider supporting my work!

[![Donate](https://camo.githubusercontent.com/6c3b5a78d466728cacf06baad81fbd1e05af9cdb0406db055d37df429291a74f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f4275795f6d655f612d4b6f2d2d66692d6666356635662e737667)](https://ko-fi.com/arthurlorent)[![Donate](https://camo.githubusercontent.com/3cd689d69c5219f5c2f2675b7ccccb50061b112100f2468c1cec746765762ebd/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f446f6e6174655f6f6e2d50617950616c2d677265656e2e737667)](https://paypal.me/arthurlorent)

Compatibility
-------------

[](#compatibility)

LaravelPHPPackage^7.\*^7.4^2.0^5.8^7.2^1.3^5.5^7.2^1.2^5.5^7.1^1.0Upgrade guide
-------------

[](#upgrade-guide)

- [From v1 to V2](/docs/upgrade-guides/from-v1-to-v2.md)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [API](#api)
    - [html\_classes](#html_classes)
    - [html\_attributes](#html_attributes)
- [Testing](#testing)
- [Changelog](#changelog)
- [Contributing](#contributing)
- [Credits](#credits)
- [Licence](#license)

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

[](#installation)

- Install the package with composer:

```
composer require okipa/laravel-html-helper
```

API
---

[](#api)

### html\_classes

[](#html_classes)

Calling this helper generates an HTML `class` tag encapsulating the given dynamic classes.

It accepts combination of strings, integers, arrays or null arguments.

```
@php
    $id = 17;
    $fullScreen = false;
    $darkMode = true;
@endphp

```

```

```

You can call `app(Okipa\LaravelHtmlHelper\HtmlClasses)->toHtml($classes)` if you want to avoid helper use.

### html\_attributes

[](#html_attributes)

Calling this helper generates dynamic HTML attributes, taking care about the given key-only, value-only or key-value combinations.

It accepts combination of strings, arrays or null arguments.

```
@php
    $dragAndDrop = true;
    $disabled = false;
@endphp
 __('Are you sure you want to delete this line?')],
    $dragAndDrop ? 'data-drag-drop' : null,
    $disabled ? ['disabled', 'data-forbid-click'] : null,
    'required'
) }}>
```

```

```

You can call `app(Okipa\LaravelHtmlHelper\HtmlAttributes)->toHtml($attributes)` if you want to avoid helper use.

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

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

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

[](#contributing)

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

Credits
-------

[](#credits)

- [Arthur LORENT](https://github.com/okipa)
- [All Contributors](../../contributors)

License
-------

[](#license)

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

###  Health Score

39

—

LowBetter than 85% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity33

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity75

Established project with proven stability

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

Recently: every ~109 days

Total

13

Last Release

2050d ago

Major Versions

1.4.0 → 2.0.02020-11-14

PHP version history (5 changes)1.0.0PHP &gt;=7.0

1.0.4PHP &gt;=7.1

1.2.0PHP ^7.2

1.4.0PHP ^7.4

2.0.0PHP ^7.4||^8.0

### Community

Maintainers

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

---

Tags

generategenerationgeneratorhelperhtmllaravelokipapackagephpphplaravelhelperpackagegeneratorhtmlgenerationgenerateokipa

###  Code Quality

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/okipa-laravel-html-helper/health.svg)

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

###  Alternatives

[okipa/laravel-table

Generate tables from Eloquent models.

57153.1k](/packages/okipa-laravel-table)[okipa/laravel-form-components

Ready-to-use and customizable form components.

198.0k1](/packages/okipa-laravel-form-components)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k9.6k1](/packages/vinkius-labs-laravel-page-speed)[linkxtr/laravel-qrcode

A clean, modern, and easy-to-use QR code generator for Laravel

3614.9k](/packages/linkxtr-laravel-qrcode)

PHPackages © 2026

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