dev-master
9999999-devBootstrap form builder for Laravel
MIT
The Requires
by Francisco Sepulveda
Bootstrap form builder for Laravel
Add to your composer.json file the package., (*1)
"socieboy/forms" : "dev-master"
Update your dependencies, (*2)
composer update
After install this package you have to set the service provider on your config/app.php file, (*3)
Socieboy\Forms\FormsServiceProvider::class
Copy the config file to your config directory., (*4)
php artisan vendor:publish
{!! checkbox('checkbox') !!}----------------- {!! text('text', 'hello') !!}----------------- {!! radio('radio') !!}----------------- {!! select('select', [ 'USA' => 'United States of America', 'MXN' => 'Mexico', 'Other' => 'Other'], 'MXN') !!}----------------- {!! email('email', null, ['placeholder' => 'email@example.com']) !!}----------------- {!! email('email', null, ['placeholder' => 'email@example.com', 'icon' => 'glyphicon glyphicon-envelope']) !!}----------------- {!! sfile('image') !!}
If you want to edit some of the templates for each control, just publish the assets., (*5)
php artisan vendor:publish --tag=form-builder-views
On your views directory you will find this path., (*6)
views/vendor/socieboy/forms
So for example, if you want to create a view for file control, just create another view with the name of the control., (*7)
file.blade.php
Then just set your css template, and you can use the variables, (*8)
$control $label $icon $error
By the way the package has support to display the erros if the field has validation., (*9)
Bootstrap form builder for Laravel
MIT