Download the PHP package lexal/laravel-stepped-form without Composer
On this page you can find all versions of the php package lexal/laravel-stepped-form. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download lexal/laravel-stepped-form
More information about lexal/laravel-stepped-form
Files in lexal/laravel-stepped-form
Informations about the package laravel-stepped-form
Laravel Stepped Form
The package is based on the HTTP Stepped Form and built for Laravel framework.
Table of Contents
- Requirements
- Installation
- Configuration
- Publish the config
- Available config options
- Usage
- License
Requirements
PHP: >=8.2
Laravel: ^11.0 || ^12.0
Installation
Via Composer
Additional changes for Lumen framework
Add the following snippet to the bootstrap/app.php
file under the providers section as follows:
Configuration
Publish the config
Run the following command to publish the package config file:
Available config options
The configuration file config/stepped-form.php
has the following options:
renderer
- contains Renderer class, instance or service alias that translates step's template definition into the response. Must implementLexal\HttpSteppedForm\Renderer\RendererInterface
;redirector
- contains Redirector class, instance or service alias that redirects user between form steps. Must implementLexal\HttpSteppedForm\Routing\RedirectorInterface
;event_dispatcher
- contains Event Dispatcher class, instance or service alias that dispatches form events. Must implementLexal\SteppedForm\EventDispatcher\EventDispatcherInterface
;exception_normalizers
- contains exception normalizers that the form uses for normalizing SteppedFormException into the Response instance. Read more about them in the HTTP Stepped Form docs;forms
- contains array of all application forms definitions. Form definition must have builder class for dynamic forms or array of steps for the static forms, settings class and storage where the form stores its data.
Usage
- Publish configuration file.
- Replace redirector, renderer and event dispatcher with your own implementation and add custom exception normalizers, if necessary.
-
Declare form settings.
-
Add forms definitions.
-
Static form
- Dynamic form
-
-
Use Stepped Form in you controller. Stepped Form service is registered under "stepped-form.{{form key}}" alias in the container.
ServiceProvider.php
CustomerController.php
See configuration file for more information.
License
Laravel Stepped Form is licensed under the MIT License. See LICENSE for the full license text.
All versions of laravel-stepped-form with dependencies
illuminate/contracts Version ^11.0 || ^12.0
illuminate/routing Version ^11.0 || ^12.0
illuminate/support Version ^11.0 || ^12.0
lexal/http-stepped-form Version ^4.0