Package Data | |
---|---|
Maintainer Username: | BraunsonYager |
Maintainer Contact: | braunson@geekybeaver.ca (Braunson Yager) |
Package Create Date: | 2014-09-18 |
Package Last Update: | 2017-11-16 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-19 03:12:39 |
Package Statistics | |
---|---|
Total Downloads: | 1,144 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 86 |
Total Watchers: | 7 |
Total Forks: | 8 |
Total Open Issues: | 0 |
This package extends Laravel's FormBuilder to include some (soon all) HTML5 elements.
Install the braunson/laravel-html5-forms
package
$ composer require "braunson/laravel-html5-forms:dev-master"
Update app/config/app.php
to activate the package
# Add `LaravelHTML5FormsServiceProvider` to the `providers` array
'providers' => array(
...
'Braunson\LaravelHTML5Forms\LaravelHTML5FormsServiceProvider',
)
Since the package extends the default FormBuilder, you can just use Form::field() like you would normally but with the following supported items.
Form::color($name, $value = null, $options = array())
Form::date($name, $min = null, $max = null, $options = array())
This field requires you input atleast min or max or both fields.
Form::time($name, $options = array())
Form::dateTime($name, $options = array())
Form::dateTimeLocal($name, $options = array())
Form::email($name, $value = null, $options = array())
Form::week($name, $value = null, $options = array())
Form::month($name, $value = null, $options = array())
Form::number($name, $value = null, $step = null, $options = array())
To specify a min/max range, add 'minmax' => '0|10'
to your options array. By default if no minmax is specified, it is min 0 and max 10.
Tip: To not output min/max, specify in options array 'minmax' => false
Form::range($name, $value = null, $options = array())
To specify a min/max range, add 'minmax' => '0|10'
to your options array. By default if no minmax is specified, it is min 0 and max 10.
Tip: To not output min/max, specify in options array 'minmax' => false
Form::search($name, $value = null, $options = array())
Form::tel($name, $value = null, $options = array())
Form::url($name, $value = null, $options = array())
Please report any bugs or feature requests on the github issues page for this project here:
https://github.com/Braunson/laravel-html5-forms/issues
composer install && ./vendor/bin/phpunit