Download the PHP package mydnic/laravel-form-blade-components without Composer
On this page you can find all versions of the php package mydnic/laravel-form-blade-components. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-form-blade-components
DEPRECATED !!!
We recommend the use of https://github.com/blade-ui-kit/blade-ui-kit
A Collection of Blade Components for Clean Forms
Installation
You can install this package via composer using this command:
The package will automatically register itself
You then must publish the components with:
This will copy the blade components in resources/views/components/form and will be automatically registered.
You can customize them the way you want.
Usage
In your blade views you can now add form elements in a very clean way.
Input
Include an <input>
element into your views.
Textarea
Include a <textarea>
element into your views.
Checkbox
Include an <input type="checkbox">
element into your views.
Select
Include a <select>
element into your views.
Pre Filling Values
By default the input are not filled with any value, like any empty input elements.
Force filling
You can force fill an attribute by providing a value
like this:
Object filling
You can fill an input value using an object attribute by providing an object
. This is very helpful when editing a resource.
"Old" value filling
All components make use of the old()
helper from laravel, allowing the input to be filled in by previous value when submitting a form. This is done automatically and do not need any additional attribute.
Styling
You can customize the css classes on each element by editing the blade components once they are published.
By default, each element use some default classes:
Label (all components)
Input
Default state:
Error state:
Textarea
Default state:
Error state:
Checkbox
Default state:
Error state:
Select
Default state:
Error state: