d3turnes/bread-templates
Composer 安装命令:
composer require d3turnes/bread-templates
包简介
Templating BREAD Views
README 文档
README
Made by Bruno Torrinha
This package let you use templates with BREAD views. It uses Laravel Blade Stacks to define each of the template sections where fields are pushed to.
You can manage Templates with the BREAD system, they are stored on database, and cache files are
generated on disk at /resources/views/vendor/voyager/templates/{template-slug}.blade.php.
Template Example
Title: Columns 6/6
Slug: columns-6-6
View:
<div class="row"> <div class="col-sm-6 col-md-6 col-lg-6"> <div class="panel panel-bordered">@stack("lf")</div> </div> <div class="col-sm-6 col-md-6 col-lg-6"> <div class="panel panel-bordered">@stack("rg")</div> </div> </div>
JSON Options
{
"template": {
"slug": "columns-6-4",
"stack": "lf"
}
}
Usage
1. Choose a Template
When you access Templates, by clicking the menu, you will see 3 templates as default, you can add or modify any of them.
2. Configure BREAD
Edit the BREAD, and use JSON Options for defining the template and stack to use.
Notes:
- you may define the
template.slugonly once, on one field. - fields with no stack parameter are pushed to the bottom.
Example
To see it in action, Voyager Pages is provided as an example.
Make sure you have installed Voyager with dummy data.
统计信息
- 总下载量: 404
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2018-06-03