Voyager hook which allows you to build extensive BREAD Views and Lists.
From your root directory clone the hook into the hooks dir
git clone https://github.com/emptynick/bread.git hooks/bread
After you cloned the hook, you can install it.
php artisan hook:install bread
Tip: if you get any errors here, run composer install bread
You can do this through Voyagers Hook-UI or by running the following command
php artisan hook:enable bread
To get you started, you can run
php artisan bread:dummydata
This will create some views, lists and models for Categories
, Pages
and Posts
This Hook works different from how you are used to in Voyager.
In Voyager you assign a Formfield to a Field, so you have a fixed amount of elements.
But in Lists or Views you can have as many Formfields as you want and assign a Field to it.
Remember that it doesn't care if it makes sense (e.g. you have the same Field assigned to three Formfields)
A BREAD-Type can have many Lists and Views.
With this you can create different Views for different roles, e.g. an Admin
can have a different View than a Writer
A View is a set of Formfields. They are used for Reading, Editing, Viewing and Adding BREAD-Content.
Views can contain the Relationships from its model.
A List is used for Browsing BREAD-Content and displaying Relationships in a View.
It can contain its own fields, relationship fields and pivot fields.
Both Views and Lists can have a free-name and get assigned to different Roles
- You can now select wether a list-item is linked or not. Normal Attributes link to the Browse-Action of the entry, relationships to the corresponding item (in a new Tab)
- Validate relationship
- Implement various FormFields
- Add
disabled
option to Formfields - Reimplement Permissions
- Dont display a relationship as a DataTable if there is only one
visible_row
- Properly display a relationship in
Read
- Add Validation-Repeater to List-Builder
- Change the way we get Model-Fields.
Currently we read the Database, because there is no way getting the attributes through the model if theres no entry.
- Adding a new entry through a relationship does not save the relationship