vaneves/laravel-form is a Laravel package for html helper for laravel framework.
It currently has 3 GitHub stars and 17 downloads on Packagist.
Install it with composer require vaneves/laravel-form.
Discover more Laravel packages by vaneves
or browse all Laravel packages to compare alternatives.
Last updated
composer require vaneves/laravel-form
Add the Form facade to the aliases array in config/app.php:
'aliases' => [
//...
'Form' => Vaneves\Laravel\Form\Form::class,
]
{!! Form::open('register') !!}
{!! Form::text('Your name', 'name') !!}
{!! Form::email('Email', 'email') !!}
{!! Form::password('Password', 'password') !!}
{!! Form::reset('Clear')->warning() !!}
{!! Form::submit('Save')->primary() !!}
{!! Form::close() !!}
Add attribute required in field.
Remove attribute required from field.
Add class input-lg in field.
Add class input-sm in field.
Add an attribute with data in element. Example:
{!! Form::text('Your Name', 'name')->attr('my-prop', 'value') !!}
Output:
<div class="form-group">
<label for="name">Your Name</label>
<input type="text" class="form-control" id="name" my-prop="value">
</div>
Remove an attribute from element.
Add an attribute with data in element. Example:
{!! Form::text('Your Name', 'name')->data('my-prop', 'value') !!}
Output:
<div class="form-group">
<label for="name">Your Name</label>
<input type="text" class="form-control" id="name" data-my-prop="value">
</div>
Add an class in element. Example:
{!! Form::text('Your Name', 'name')->addClass('material-design') !!}
Output:
<div class="form-group">
<label for="name">Your Name</label>
<input type="text" class="form-control material-design" id="name">
</div>
Remove class from element.