rokde/laravel-bootstrap-formbuilder
最新稳定版本:0.1.1
Composer 安装命令:
composer require rokde/laravel-bootstrap-formbuilder
包简介
Laravel 5 FormBuilder for Blade Engine and the Twitter Bootstrap CSS Framework
README 文档
README
Laravel 5.1 FormBuilder for Blade Engine and the Twitter Bootstrap CSS Framework.
This FormBuilder enhances the Laravel Collective FormBuilder for its use within the Bootstrap CSS Framework.
Installation
$> composer require "rokde/laravel-bootstrap-formbuilder:~0.1"
For Laravel 5.1:
$> composer require "rokde/laravel-bootstrap-formbuilder:~0.0.1"
Then updating:
$> composer update
Next, add your new provider to the providers array of config/app.php:
Rokde\LaravelBootstrap\Html\HtmlServiceProvider::class,
Finally, add two class aliases to the aliases array of config/app.php:
'Form' => Collective\Html\FormFacade::class,
'Html' => Collective\Html\HtmlFacade::class,
We use the Facades from Laravel Collective.
Usage
All Bootstrap recommendations for form and input elements are built in, so you do not have to worry about the right classes and tag-soup.
Form Groups
{!! Form::openGroup('name', 'Name') !!}
{!! Form::text('name') !!}
{!! Form::closeGroup() !!}
Will render:
<div class="form-group"><label for="name">Name</label>
<input class="form-control" name="name" type="text" id="name">
</div>
Error handling is also included.
Further Resources
Heavily inspired by Easy Bootstrap Forms In Laravel, so the main credits goes to Stidges.
You can read at Laravel Collective another usage examples.
统计信息
- 总下载量: 11.62k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 7
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-08-04