Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Html Builders

Html Builders Laravel Package

apie/html-builders

HTML builder utilities for the Apie ecosystem. Provides internal components to generate and compose HTML fragments in PHP, used by other Apie packages. Developed in the Apie monorepo; limited standalone documentation available.

View on GitHub
Deep Wiki
Context7

At a glance

Frequently asked questions about Html Builders
Can I use apie/html-builders to replace Blade templates in Laravel?
No, this package isn’t a Blade replacement. It’s designed for programmatic HTML generation—ideal for dynamic fragments like emails, PDFs, or complex UI components. Use it alongside Blade for templating logic while keeping HTML construction decoupled.
How do I install apie/html-builders in a Laravel project?
Run `composer require apie/html-builders` in your project root. The package has no Laravel-specific dependencies, so no additional setup is needed beyond requiring it. For Laravel integration, you’ll need to manually bind it to the container or use a facade.
Does apie/html-builders support Laravel 10+ and PHP 8.3?
Yes, the package requires PHP 8.3+, which aligns with Laravel 10+. If you’re on Laravel 9.x, you’ll need to upgrade PHP or isolate the package in a Docker container to avoid conflicts with older PHP versions.
Are there Laravel-specific features like Blade directives or Facades?
No, the package is framework-agnostic. You’ll need to create a custom Service Provider to bind the builder to Laravel’s container or build a Facade for Blade/Livewire compatibility. Example: `Html::div()->class('container')` can be wrapped in a Facade for cleaner Blade usage.
How does apie/html-builders handle testing in Laravel?
The package includes PHPUnit 11.x support, which integrates with Laravel’s testing stack. Test HTML output by comparing strings or using Laravel’s `assertViewIs` equivalent for programmatic builders. For visual testing, consider tools like Laravel Dusk or snapshot testing libraries.
Will apie/html-builders work with Livewire or Inertia.js?
Yes, but you’ll need to integrate it manually. For Livewire, bind the builder to the container and use it in component methods. For Inertia, return HTML strings from your API responses. The package’s composable nature makes it flexible for both use cases.
Are there alternatives to apie/html-builders for Laravel?
Yes, consider `spatie/html` for HTML generation or `laravelcollective/html` for Blade helpers. If you need a more Laravel-native solution, explore `laravel-shift/blade-html` for Blade-specific extensions. Choose based on whether you prefer programmatic builders or Blade integration.
How do I handle conflicts with ramsey/uuid or symfony/mime?
The package optionally depends on `ramsey/uuid` and `symfony/mime`. If you’re using Laravel’s built-in UUID handling or a different version of `symfony/mime`, isolate the package by requiring specific versions in your `composer.json` or use a custom namespace to avoid global conflicts.
Is apie/html-builders actively maintained and Laravel-friendly?
The package is maintained as part of the Apie monorepo, with CI-driven testing and published coverage reports. However, it lacks Laravel-specific documentation or features. Contributions must go through the monorepo, which could introduce delays. For Laravel-focused updates, check the Apie roadmap or fork the package.
Can I use apie/html-builders for non-web contexts like CLI tools or APIs?
Absolutely. The package is framework-agnostic and can generate HTML for CLI tools (e.g., Artisan commands), API responses, or even PDF generation libraries. Its lightweight design makes it ideal for any PHP environment where dynamic HTML is needed.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
anousss007/vigilance
supportpal/eloquent-model
ardenexal/fhir-models
laravel-at/laravel-image-sanitize
romalytar/yammi-audit-log-laravel
ardenexal/fhir-validation
arshaviras/weather-widget
laravel-chronicle/core
sunchayn/nimbus
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon