21torr/html-builder
Fluent HTML builder for Laravel/PHP. Programmatically compose tags, attributes, and nested elements with a clean API to generate consistent markup without mixing large HTML strings into your views or controllers.
parent element feature reduces boilerplate for complex structures, further tilting the balance toward "buy" for Laravel/PHP projects requiring dynamic, nested HTML generation.Layout class that all pages inherit from).spatie/html or consider forking).htmlpurifier or avoid for security-critical paths).For Executives: "This updated package now supports hierarchical HTML structures, making it even more valuable for generating complex, nested components—like emails with structured sections or dashboards with collapsible panels—without frontend involvement. For Laravel/PHP projects where HTML is assembled server-side, it’s a low-risk way to reduce dev time and improve consistency. The recent update (adding parent element access) is a minor but meaningful step forward, though we’d still treat it as a short-term tool or fork it for critical paths. It’s a quick win for teams hitting pain points with manual HTML string manipulation."
For Engineering:
*"The new parent element feature makes this package more powerful for building nested HTML structures—think:
header->addChild(body->addChild(promotionSection))).spatie/html are more active but heavier. Worth a spike if you’re building complex nested HTML in PHP/Laravel."*How can I help you explore Laravel packages today?