Skip to content
BREAD Templates with Voyager
PHP
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
publishable/database Fix query unseeding Feb 6, 2018
resources/views/bread Small Fix edit-add.blade Jul 11, 2017
routes Rename hook to bread-templates Jan 30, 2018
src move folder database to publishable Feb 6, 2018
tests
.gitattributes Working this out... Jun 18, 2017
.gitignore Working this out... Jun 18, 2017
.php_cs add CI back Jan 21, 2018
.travis.yml Added tests, travis, php_cs Jul 11, 2017
LICENSE
README.md Fix StyleCI-01 Jul 11, 2017
composer.json fix composer.json wrong seed path Feb 6, 2018
phpunit.xml Update composer.json name Jul 12, 2017

README.md

Voyager Templates

Build Status Build Status Total Downloads Latest Stable Version License

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.slug only 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.

You can’t perform that action at this time.