Download the PHP package bozboz/laravel-backpack-visualcomposer without Composer
On this page you can find all versions of the php package bozboz/laravel-backpack-visualcomposer. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-backpack-visualcomposer
Visual Composer for Backpack
Improve the way you edit pages.
Installation
Ensure the following is added to your composer.json
Then add this to config/app.php
:
Finally, run:
Use
In the model:
In the crud controller:
In the model view:
Edit default config and templates
Run:
...it will output the list of copied files than can now be overwritten, including the config, the backpack field type, the language files and 11 built-in templates:
- Article, an wysiwyg and inputs for the title, subtitle, date, author, CTA button and user-customizable colors
- BackgroundImageAndText, an uploadable picture with a caption and wysiwyg description
- ImageInBase64, a picture stored as base64 instead of file upload
- ImageInContainer, an uploadable picture, and that’s it
- LeftImageRightText, a picture and some text fields on two columns
- LeftTextRightImage, some text fields and a picture on two columns
- LeftTextRightQuote, some text fields and customizable background color, on two columns
- Minimal, an empty template with the minimum code for it to work
- Slideshow, a slider of unlimited pictures and their captions
- ThreecolumnsImageTextCta, three columns with a picture, a title, a wysiwyg and a CTA button on each of them
- TwoColumnsImageTextCta, the same as above, but on two columns instead of three
Check out how they are made, so you can customize them and build your own.
Steps to create a new Template
- Create a class for your template. This needs to extend
Bozboz\LaravelBackpackVisualcomposer\Templates\RowTemplateAbstract
eg.
-
Add the template classname to
project/config/visualcomposer.php
templates array - In
project/resources/views/vendor/visualcomposer/templates
there is a folder for each template. Create a folder with the classname eg. MyNewRowTemplate. The folder needs a crud.blade.php (for admin) and a front.blade.php (for frontend). See the other templates for examples.
eg In crud.blade.php
:
- In
project/resources/lang/vendor/visualcomposer/en/templates.php
add an array element which defines what the template will appear as in the admin dropdown list, as well as terms within crud.blade.php eg.