realcahsowan / laravel-bulma-form
Simple form builder for Laravel, using Bulma css
Installs: 57
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:Blade
Requires
- php: >=7.1.3
This package is auto-updated.
Last update: 2024-05-10 09:11:09 UTC
README
Laravel form builder using Bulma css
Installation
composer require realcahsowan/laravel-bulma-form
Usage
Form Class File
php artisan make:form BookForm
above command will generate BookForm
class file in app/Http/Forms
directory
Inside Controller
// Don't forget to import use App\Http\Forms\BookForm; public function create(BookForm $form) { return view('books.create')->with('form', $form->generate('POST', route('books.store'))); }
Insde View
To render the form simply do {{ $form }}
NOTE: Handle disabled inputs
Add below lines insde the body tag of your layout blade file:
<!-- resources/views/layouts/master.blade.php -->
@yield('extra_script')