Package Data | |
---|---|
Maintainer Username: | grohiro |
Package Create Date: | 2014-06-18 |
Package Last Update: | 2017-10-03 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-12-22 15:00:54 |
Package Statistics | |
---|---|
Total Downloads: | 8,528 |
Monthly Downloads: | 204 |
Daily Downloads: | 0 |
Total Stars: | 14 |
Total Watchers: | 4 |
Total Forks: | 3 |
Total Open Issues: | 1 |
LaravelBladeMacro creates a reusable template block in a blade template file.
form.blade.php
@macro('bootstrap_input', $type, $field, $label = "", $opts = ['class' => 'form-control'])
<div class="form-group">
<label class="col-sm-1 control-label">{{$label}}</label>
<div class="col-sm-8">
{!! Form::$type($field, '', $opts) !!}
</div>
</div>
@endmacro
{!! Html::bootstrap_input('text', 'username', 'Username') !!}
{!! Html::bootstrap_input('text', 'email', 'E-Mail', ['required' => 'required', 'class' => 'form-control']) !!}
Html
Facade.$ composer require 'grohiro/laravel-blade-macro'
config/app.php
$providers = [
//
Grohiro\LaravelBladeMacro\BladeMacroServiceProvider::class,
];