laravelcollective/html
LaravelCollective HTML provides maintained form and HTML helpers for Laravel apps. Generate form fields, labels, links, and other elements with a fluent, Blade-friendly API. Ideal for projects migrating from legacy helpers or needing rapid UI scaffolding.
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?