shyam-achuthan / laravel5bootstrap3form by shyam-achuthan

Form builder for Laravel5 based on bootstrap3 form group / controls
43
2
3
Package Data
Maintainer Username: shyam-achuthan
Maintainer Contact: shyam@shyamachuthan.com (Shyam Achuthan)
Package Create Date: 2015-09-02
Package Last Update: 2017-10-16
Language: PHP
License: MIT
Last Refreshed: 2024-11-24 03:03:40
Package Statistics
Total Downloads: 43
Monthly Downloads: 2
Daily Downloads: 0
Total Stars: 2
Total Watchers: 3
Total Forks: 1
Total Open Issues: 0

Laravel5Bootstrap3Form

Form builder for Laravel5 based on bootstrap3 form controls

composer require shyam-achuthan/laravel5bootstrap3form

add / replace form facade with 'Form' => ShyamAchuthan\Laravel5Bootstrap3Form\Html\FormFacade::class, in the config/app.php

add/replace htmlservice provider (Illuminate\Html\HtmlServiceProvider) with

\ShyamAchuthan\Laravel5Bootstrap3Form\Providers\HtmlServiceProvider::class

##Usage Form::input($type,$name,$value,$options_array,$label) ###Blade Template

{{ \Form::open() }}
{{ \Form::input('text',"username", "",['placeholder'=>"Enter Username"],'Email / Username') }}
{{ \Form::close() }}

###Output

 <div class="form-group">
 <input placeholder="Enter Username" class="form-control" name="username" type="text" value="" id="username"> 
 </div>

###Output on validation error

 <div class="form-group has-error">
 <input placeholder="Enter Username" class="form-control" name="username" type="text" value="" id="username"> 
 <p class="help-block">Username is required</p>
 </div>

###Disable Bootstrap Form and use Illuminate Html default methods \Form::disable_bootstrap(); ###Enable Bootstrap form after disabling \Form::enable_bootstrap();