philipsorensen / formcomponents
View components for forms in Laravel
Installs: 6
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Requires
- philipsorensen/bootstrapicons: ^1.1.0
README
View components for forms in Laravel based on Bootstrap 5.
Installation
composer require philipsorensen/formcomponents
Add the following in your config/app.php
under providers.
PhilipSorensen\FormComponents\Providers\FormComponentsProvider::class
Usage
<x-formcomponents::input />
Includes button, checkbox, email, hidden, input, number, password, select and text. Each component has label and error statements included.
The example below works for both create and edit forms. If $item is set, then it shows the edit version.
<x-formcomponents::input id="name" name="Navn" :value="old('name', isset($item) ? $item->name : '')" />