3. Basic Inputs - joserick/laravel-bootstrap-4-forms GitHub Wiki
Basic inputs
Text inputs
| Param |
Type |
Default |
Description |
| $name |
string |
null |
Input name |
| $label |
string |
null |
Input label |
| $default |
string |
null |
Default value |
// Example
{!!Form::text('name', 'User name')!!}
Type
| Param |
Type |
Default |
Description |
| $type |
string |
null |
Type field |
// Examples
// Password field
{!!Form::text('password', 'Your password')->type('password')!!}
// Number field
{!!Form::text('age', 'Your age')->type('number')!!}
// Email field
{!!Form::text('email', 'Your email')->type('email')!!}
Textarea
| Param |
Type |
Default |
Description |
| $name |
string |
null |
Input name |
| $label |
string |
null |
Input label |
| $default |
string |
null |
Default value |
// Example
{!!Form::textarea('description', 'Description')!!}
Select
| Param |
Type |
Default |
Description |
| $name |
string |
null |
Input name |
| $label |
string |
null |
Input label |
| $options |
array |
[] |
Select options |
| $default |
string |
null |
Default value |
// Example
{!!Form::select('city', 'Choose your city', [1 => 'Gotham City', 2 => 'Springfield'])!!}
Checkbox
| Param |
Type |
Default |
Description |
| $name |
string |
null |
Input name |
| $label |
string |
null |
Input label |
| $value |
string |
null |
Input value |
| $checked |
boolean |
null |
Default value |
// Example
{!!Form::checkbox('orange', 'Orange')!!}
Radio
| Param |
Type |
Default |
Description |
| $name |
string |
null |
Input name |
| $label |
string |
null |
Input label |
| $value |
string |
null |
Input value |
| $checked |
boolean |
null |
Default value |
// Example
{!!Form::radio('orange', 'Orange')!!}
Tel inputs
| Param |
Type |
Default |
Description |
| $name |
string |
null |
Input name |
| $label |
string |
null |
Input label |
| $default |
string |
null |
Default value |
// Example
{!!Form::tel('number', 'Phone number')!!}