arcanedev/php-html
A lightweight PHP package for building HTML elements programmatically with a clean, fluent API. Create tags, attributes, and nested content without messy string concatenation, keeping markup generation readable, reusable, and easy to test in any PHP or Laravel project.
spatie/laravel-html, Twig, or PHP 8.4's Dom\HTMLDocument cover the same need with better support and longevity?HtmlBuilder interface or a thin custom facade so the concrete package is swappable. The realistic migration target is ad-hoc sprintf('<div class="%s">…') and concatenated markup in services and jobs — not Blade views, which should be left alone.composer.json PHP constraint, run composer why-not against the application, and grep for helper-function collisions after install (several Arcanedev packages register str_*/html()-style globals). Confirm PSR-4 autoloading and check for auto-discovery surprises before merging into main.spatie/laravel-html and native DOM building. (4) Adopt broadly only if the wrapper is demonstrably cheaper to own than the alternatives; otherwise keep the spike contained and retire the dependency.How can I help you explore Laravel packages today?