codedor / laravel-livewire-forms
Easy to build/use livewire forms.
v4.0.0
2023-10-19 08:10 UTC
Requires
- php: ^8.0
- livewire/livewire: ^3.0
- petercoles/multilingual-country-list: ^1.2
Requires (Dev)
- orchestra/testbench: ^7.0
- pestphp/pest: ^1.21
- pestphp/pest-plugin-livewire: ^1.0
This package is auto-updated.
Last update: 2025-02-19 14:13:11 UTC
README
Package to easily configure Livewire forms with a set of existing fields.
Installation
You can install the package via composer:
composer require codedor/laravel-livewire-forms
You can publish the config file with:
php artisan vendor:publish --tag="laravel-livewire-forms-config"
This is the contents of the published config file:
return [ 'defaults' => [ 'formClass' => 'd-flex flex-column gap-8', 'rowClass' => 'row gy-8', 'colClass' => 'col-md', 'divClass' => 'form-group has-validation', 'groupClass' => 'd-flex flex-column gap-8', 'inputClass' => 'form-control', 'inputSelectClass' => 'form-select', 'labelClass' => 'form-label', 'fileInputClass' => 'form-input-file', 'fileInputLabelClass' => 'form-label-file', 'checkInputClass' => 'form-check-input', 'checkLabelClass' => 'form-check-label', 'buttonClass' => 'btn btn--primary', 'buttonIcon' => null, 'textareaRows' => 5, ] ];
Optionally, you can publish the views using
php artisan vendor:publish --tag="laravel-livewire-forms-views"
Usage
@livewire('registration-form')
Documentation
For the full documentation, check here.
Testing
vendor/bin/pest
Changelog
Please see CHANGELOG for more information on what has changed recently.
Upgrading
Please see UPGRADING for more information on how to upgrade to a new version.