okipa/laravel-form-components
Ready-to-use, fully customizable Laravel form components that generate HTML for you. Livewire compatible, supports Bootstrap 4/5 (TailwindCSS 3 planned). Includes form, input, textarea and more, with model binding and flexible configuration.
This package is a full rewrite of the okipa/laravel-bootstrap-components package.
This rewrite has been made for the following reasons:
Follow the steps below to upgrade the package.
You now can use a form component which will automatically generate CSRF and method spoofing hidden fields for you.
As so, you should:
See documentation to check how to use form component.
For example, you'll have to replace this component call:
{{ inputEmail()->name('email')->componentHtmlAttributes(['required', 'autofocus', 'autocomplete' => 'email']) }}
By this one:
<x-form::input type="email" name="email" autofocus autocomplete="email" required/>
You'll have to execute this replacement work for each of the following components:
inputText()inputEmail()inputPassword()inputUrl()inputTel()inputNumber()inputColor()inputDate()inputTime()inputDateTime()inputFile()textarea() component must be replaced by the textarea componentselect() component must be replaced by the select componentinputCheckbox() component must be replaced by the checkbox componentinputSwitch() component must be replaced by the toggle-switch componentinputRadio() component must be replaced by the radio componentsubmit()submitValidate()SubmitCreate()SubmitUpdate()button()buttonBack()buttonCancel()buttonLink()Of course if you did use the Facade way to call the okipa/laravel-bootstrap-components components in your views, you'll have to adapt the replacements specified above.
If you see any forgotten and undocumented changes, please submit a PR to add them to this upgrade guide.
How can I help you explore Laravel packages today?