laminas/laminas-form
Laminas Form provides a robust object-oriented API for building, validating, filtering, and rendering PHP forms. It includes elements, collections, annotations, input filters, and view helpers for creating secure, reusable forms in Laminas MVC applications.
laminas/laminas-form is a framework-agnostic form, validation, filtering, and hydration component from the Laminas ecosystem. Laravel’s native architecture centers on FormRequests, the Validator facade, Blade components, Eloquent, and Laravel’s service container. Adopting Laminas Form creates a second form/validation abstraction alongside Laravel’s. It fits best only when the product needs capabilities Laravel does not provide cleanly: nested Fieldsets/Collections, reusable input-filter definitions, and hydrators that cast forms to/from business objects. It is a poor fit for simple CRUD, auth, checkout, or other Blade-native forms.BusinessFormHandler or FormDefinition. Start with one complex, non-critical form. Wrap form creation in a Laravel service provider, map Laminas validation errors into Laravel’s error bag format, and expose a Blade component or JSON schema for rendering. Keep Laravel’s CSRF token and request lifecycle authoritative.laminas/laminas-form and its transitive dependencies. Verify PHP, psr/container, and Laminas component versions against the Laravel release. Avoid depending on laminas-servicemanager configuration if Laravel’s container can instantiate forms through explicit factories. If using Laminas view helpers, account for laminas-view as an additional dependency; otherwise build a small renderer to avoid pulling in the MVC view layer.How can I help you explore Laravel packages today?