-
Notifications
You must be signed in to change notification settings - Fork 0
Home
This package was created by developer for developers and web masters. The main goal it's easy building and flexible extensioning of forms. With this package you can create and customize forms, fill their fields with data from any source with using additional data mappers. Each field is a kind of component like in some reactive JS frameworks, they are encapsulated from outside logic and may be reusable.
When creating forms, you usually have to do the same actions, create a template for displaying a form, describe inputs, handle validation errors, return old values to forms and fill data from existing ones. Using this package, you avoid these actions, you just need to describe the configuration of your form and create one template for the output of the html form.
To install the package, you need to run the command:
composer require dobrik/laravel-easy-form
To publish package templates and default configuration run the command:
php artisan vendor:publish --provider="\Dobrik\LaravelEasyForm\ServiceProvider"
For building forms package used Laravel pipelines.
Each form element has its own handlers that are defined in the configuration handlers.php
file, each handler have access to payload.
Payload contains Container
, Builder
, Factory
, element configuration, array of form data and HtmlAbstract
- handled object.
In your custom handlers you always have access to builder and you can build any element recursively.