laravelcollective/html
LaravelCollective HTML provides classic form and HTML builders for Laravel, including helpers for generating form fields, labels, and secure inputs with CSRF support. Ideal for projects migrating from older Laravel versions or preferring fluent, server-side markup generation.
Pros:
Form/HTML helpers.Cons:
Form/HTML helpers with minimal configuration (publish assets, register facade).collective/html vs. old Laravel syntax).data-* attributes).Validator facade.Form::open()). Feature tests with live Blade rendering are recommended.{{-- }} syntax)?collective/html compatibility?collective/html helpers).Form::* or HTML::* usage (deprecation warnings).Form::macro('search', fn() => ...)).collective/html in phases (e.g., by module).php artisan vendor:publish for config/templates).{{-- }} comments).laravel-form-components or spatie/laravel-form-builder.mix-manifest.json, verify CSS/JS paths in generated HTML.{{ Form::text('email') }}) must match Eloquent models.laravelcollective/html (no dev dependencies needed).php artisan vendor:publish --tag=html.config/app.php:
'aliases' => [
'Form' => Collective\Html\FormFacade::class,
'HTML' => Collective\Html\HtmlFacade::class,
],
composer.json to require ~6.0 (latest stable).AppServiceProvider@boot):
Form::macro('submit', function ($label = 'Submit') {
return '<button type="submit" class="btn btn-primary">' . e($label) . '</button>';
});
Form::select(), HTML::link()).laravelcollective/html to gauge common pain points.Form::open() without Form::close()).{{ dd($errors) }} in Blade to inspect form data.php artisan optimize).Form::submit()).How can I help you explore Laravel packages today?