A Composer package that defines reusable HTML forms in Laravel using class-based form objects, validation rules, and helpers. Bootstrap 3 styling is supported by default.
Overview
Laravel Form Builder helps PHP developers define web forms in Laravel applications using a workflow inspired by Symfony’s form builder. You create dedicated form classes, add fields with types and validation rules, and render them in views through helpers or the FormBuilder facade.
Installation is via Composer: register the service provider and optional facade, and the package can pull in laravelcollective/html aliases when needed. An Artisan command can scaffold form classes with a chosen set of fields.
Forms support model binding, partial saves, updates after submit, and validation with redirect-on-error patterns. You can also build forms from arrays when a full class is not required. Bootstrap 4 layouts are available through a separate companion package.
The package targets Laravel 5 and newer lines and integrates with Laravel’s validation and routing so controllers can create forms, check validity, and read field values in a consistent way.
Key features
- Class-based form definitions
- Artisan form scaffolding command
- Field types with validation rules
- Model bind and update flows
- Array-based quick form creation
- Bootstrap 3 default styling
- FormBuilder facade and service provider
- View helper to render forms
Use cases
- CRUD screens in Laravel apps
- Validated admin data entry forms
- Reusable form classes across views
- Model-backed create and edit workflows