natabio/bs4-form

基于 Laravel Collective 5 的 Twitter Bootstrap 4 表单服务。

v2.0.1 2018-07-17 11:26 UTC

This package is not auto-updated.

Last update: 2024-09-29 05:20:49 UTC


README

Packagist GitHub release

这是 Laravel 5 框架 core-system 应用程序的一个独立部分。

CORE-SYSTEM 是基于 Laravel 5 的应用程序

CORE-SYSTEM Bootstrap Form 包含用于简单 Twitter Bootstrap 3 表单生成和请求验证错误处理的 laravel-collective/html 扩展。

摘要

许可证

GPL-3.0+

要求和依赖

此软件包使用 composer 安装依赖项

Composer

  • "php": ">=5.5.9",
  • "laravel/framework": "~5.5.0|~5.6.0",
  • "laravelcollective/html": "^5.5.0"

安装

运行命令行并进入您的项目文件夹,然后粘贴以下命令

    $ composer require natabio/bs4-form

表单方法

创建 <form> 字段

{!! Form::open(['url' => mixed $route = null, string 'method' => 'POST|PATCH|DELETE|GET', (optional) bool 'files' => true]) !!}

创建带有模型的 <form> 字段

{!! Form::model(mixed $model = null, ['url' => mixed $route = null, string 'method' => 'POST|PATCH|DELETE|GET', (optional) bool 'files' => true]) !!}

创建 </form> 标签

{!! Form::close()) !!}

创建 <input> 字段

{!! Form::inputGroup(string $type = 'text', string $lable = null, string $name = null, mixed $value = null, array $options = []) !!}

创建 <select> 字段

{!! Form::selectGroup(string $lable = null, string $name = null, array $options = [], mixed $selected = null, array $options = []) !!}

创建 <input type="checkbox"> 字段

{!! Form::inlineCheckbox(string $name, mixed $value = 1, mixed $label = null, bool $checked = null, array $options = []) !!}

创建 <input type="radio"> 字段

Form::inlineRadio(string $name, mixed $value = 1, mixed $label = null, bool $checked = null, array $options = [])