承接 laracore/formbuilder 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

laracore/formbuilder

Composer 安装命令:

composer require laracore/formbuilder

包简介

Laravel 5.x FormBuilder for Blade Engine based on Bootstrap 3

README 文档

README

Laravel 5.1 FormBuilder for Blade Engine, based on Bootstrap 3 and used in Laracore CMS.

This FormBuilder allows for creation of HTML forms using objects and renders them using the Laravel Collective FormBuilder and the Bootstrap CSS Framework.

##Features

  • Object to HTML mapping based on the Bootstrap framework

  • Modifiable views for each form component

  • Support for Laravel Form Model Binding

  • Extensible API for an easy way to add new components

Installation

$> composer require "laracore/formbuilder:dev-master"

$> composer update

Next, add your new provider to the providers array of config/app.php:

Laracore\FormBuilder\FormBuilderServiceProvider::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 predefined in the provided classes and just have to be used or you can override them and provide your own.

Create a new form

$form = new FormBuilder();

Add a component

$form->addComponent(new TextField('name', 'Name'));

Render the form

$form->render();

Adding multiple components at once

$components = [
	new TextField('name', 'Name'),
	new PasswordField('password', 'Password'),
	new PasswordField('confirm_password' 'Confirm your password'),
	new SubmitButton('Register user')
];

$form->addComponent($components);

Create form using named constructor

$model = new App\User();
$form = FormBuilder::create('POST', ['class' => 'form-horizontal', 'role' => 'form'], $model);

$components = [
	new TextField('name', 'Name'),
	new PasswordField('password', 'Password'),
	new PasswordField('confirm_password' 'Confirm your password'),
	new SubmitButton('Register user')
];

$form->addComponent($components);

Create form and add components using named constructor

$model = new App\User();

$components = [
	new TextField('name', 'Name'),
	new PasswordField('password', 'Password'),
	new PasswordField('confirm_password' 'Confirm your password'),
	new SubmitButton('Register user')
];

$form = FormBuilder::create('POST', ['class' => 'form-horizontal', 'role' => 'form'], $model, $components);

统计信息

  • 总下载量: 29
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-15

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固