genealabs / bones-macros
0.3.0
2016-01-16 21:31 UTC
Requires
- php: >=5.5.9
- illuminate/support: 5.2.*
- laravelcollective/html: 5.2.*
Requires (Dev)
This package is auto-updated.
Last update: 2022-02-01 12:37:48 UTC
README
此包已不再维护,请使用 https://github.com/GeneaLabs/laravel-casts 代替。
Laravel Bones Macros (bones-macros)
安装
在 Laravel 5.2 中安装 bones-macros
composer require "genealabs/bones-macros":"0.3.*"
或将其添加到 composer.json 文件中
"require": { /* ... */, "genealabs/bones-macros": "0.3.*" }, /* ... */
如果使用 Laravel < 5.2,请使用版本 0.2.*
。
然后将服务提供者添加到 app.php 配置文件中
// 'providers' => array( 'GeneaLabs\BonesMacros\BonesMacrosServiceProvider', // );
用法
这些 HTML 和表单宏主要用于在 Blade 模板中减少繁琐的工作。
方法
以下方法可供使用
// provides a Bootstrap-compatible cancel button that will take you to the previous page. {{ Form::cancelButton() }} // provides a select list with a range of intervals {{ Form::selectRangeWithInterval($name, $start, $end, $interval, $default = null, $attributes = []) }} // provides ability to slugify any text {{ HTML::slugify($text) }}
依赖项
目前此包需要
- Laravel 4.2+
- Bootstrap 3.1+