Download the PHP package clevyr/backpack-page-builder without Composer
On this page you can find all versions of the php package clevyr/backpack-page-builder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download clevyr/backpack-page-builder
More information about clevyr/backpack-page-builder
Files in clevyr/backpack-page-builder
Package backpack-page-builder
Short Description Clevyr Page Builder for Backpack
License GPL-3.0-or-later
Homepage https://clevyr.com
Informations about the package backpack-page-builder
Backpack Page Builder
Prerequisite
Laravel Backpack must be installed
- Laravel 7
- PHP 7.4
- GD or Imagick for Image Intervention
Table of Contents
- Installation
- Create a super admin
- Page Development
- Sync Pages
- Edit Static Pages
- Edit Dynamic pages
- Creating pages
- Generating Pages
- Development
- Local Package Development
Installation
Run composer require clevyr/backpack-page-builder
This will install the Page Builder and the https://github.com/Laravel-Backpack/PermissionManager package
This will install Image Intervention http://image.intervention.io/getting_started/introduction
To install the Page builder run the following command, this will install the Permissions Manager and the Page Builder
Run php artisan pagebuilder:install
Update the config -> backpack -> base.php
file
to
Run composer dump-autoload
Seed the permissions
Run php artisan db:seed --class=PageBuilderSeeder
Update resources -> views -> vendor -> backpack -> base -> inc -> sidebar_content.blade.php
file with
Update app -> User.php
with
Create a super admin
Run php artisan pagebuilder:user
Run with parameters
Page Development
Syncing pages
Navigate to pages -> manage
Click the sync icon in the bottom right, this will load in static pages (Every folder that is not the dynamic folder) and it will reload the page
You also have the option to sync them from the command line with the following command
php artisan pagebuilder:sync
Editing static pages
Navigate to the page management page and click edit on the homepage
Page Settings
Name: Page name, admin functionality only, does not affect the functionality of the page's at all
Title: Page title, also generates the slug as you type
Slug: Slug of the page
View: Page view
Page Content
The page content populates with a list of sections, and their fields which you can edit.
Editing Dynamic pages
See Editing Static Pages for a run down of Page Settings and Page Content
- Page Layout
Note - You can only use the Page Layout tab if you are working with a dynamic page
Sections list
A list of dynamic sections will be displayed, you can click them to add them to the Content Section
Content Section
The content section displays the sections that will be available to edit on the page
You will not be able to edit the content until you save the page
Creating pages
Pages are located at resources -> views -> pages
each folder is considered as the page, with the contents inside
the folder dictating what view / sections are available
Contents
- Sections - Holds each individual section for that view
- config.php - Holds the configuration for the page sections
- index.blade.php - Is the view of the page
Note - Pages sections will not sync if there is not a .blade
file inside the sections directory and
a config property inside the config.php
Generating Pages
To generate a new page run the following command
php artisan pagebuilder:page page
with page being the name of the new page
This will create a folder with the page name with the following structure
- page
- index.blade.php
- config.php
- sections
- default.blade.php
Sections
The sections
folder holds the .blade
files that correspond to the section key in the config.php
Using data inside a section
You have access to the $sections
variable which is an anonymous function that returns
the field data from the section name
and the field title
config.php
The config.php
holds the configuration of the page sections.
Each section holds a list of backpack crud fields https://backpackforlaravel.com/docs/4.1/crud-fields
any field, including custom fields will be available to be used inside the config.
Example config
index.blade.php
The index.blade.php
is the view file for the page and it's sections.
Example index.blade.php
Development
Submitting Changes
Please push your changes to a new branch before submitting a PR
Setting up local package development
- Within the root of an existing Laravel Backpack project, clone this project to
./packages/clevyr/backpack-page-builder
-
Add the following to your composer.json
-
Add
clevyr/backpack-page-builder
to your list of requires in yourcomposer.json
like below: - Run
composer require clevyr/backpack-page-builder
All versions of backpack-page-builder with dependencies
backpack/permissionmanager Version ^7.0
intervention/image Version ^2.5