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
.
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>
{
"template": {
"slug": "columns-6-4",
"stack": "lf"
}
}
When you access Templates, by clicking the menu, you will see 3 templates as default, you can add or modify any of them.
Edit the BREAD, and use JSON Options for defining the template and stack to use.
Notes:
- you may define the
template.slug
only once, on one field. - fields with no stack parameter are pushed to the bottom.
To see it in action, Voyager Pages
is provided as an example.
Make sure you have installed Voyager with dummy data.