Page Designer
super-admin-org/page-designer adds a pagedesigner form field: a canvas where editors place blocks (text, images, video, inline galleries, embeds) freely, resize them on a snap grid, and edit each block's content. A front-end route renders the saved layout.
| Package | super-admin-org/page-designer |
| Adds | $form->pagedesigner('data') |
| Menu | Page Designer |
| Permission | ext.page-designer (path /page-designer*) |
| Depends on | CKEditor (for text blocks) |
- The admin pages come from example controllers that you publish into your application and route yourself (steps below). Until your route exists,
/admin/page-designershows a checklist of the remaining steps (2.0+). - Publishing writes into
app/Admin/Controllers,app/Admin/Traits,app/Http/Controllers,app/Models,database/migrationsandresources/views. Run it on a clean Git working tree so you can review the result. - It depends on the CKEditor extension; read its licensing note.
- Releases 1.x registered
/admin/page-designerto a controller the package did not contain, which also brokephp artisan route:list, and published the example into anApp/folder in the project root. Use 2.0 or newer.
Installation
composer require super-admin-org/page-designer
php artisan admin:import page-designer
php artisan vendor:publish --tag=page-designer # assets + example controllers, models, migrations, views
php artisan migrate
Publish them separately with --tag=page-designer-assets and --tag=page-designer-example (2.0+).
Add the admin routes to app/Admin/routes.php:
$router->resource('page-designer', PageDesignerController::class);
$router->resource('page-designer-images', PageDesignerImagesController::class);
$router->resource('page-designer-videos', PageDesignerVideoController::class);
$router->resource('page-designer-texts', PageDesignerTextController::class);
$router->resource('page-designer-inline-galleries', PageDesignerInlineGalleryController::class);
$router->resource('page-designer-embeds', PageDesignerEmbedController::class);
and the front-end route to routes/web.php:
use App\Http\Controllers\PageDesignerController;
Route::get('/page/{id}', [PageDesignerController::class, 'index'])->name('page-designer');
Usage
In a form:
$form->pagedesigner('data', __('Page design'));
// Snap grid in pixels (default 40)
$form->pagedesigner('data')->snap(30);
Open /page/{id} to see the rendered page; change its look in resources/views/page_designer.blade.php.
Adding block types
The designer scans the admin controllers (admin.route.namespace, default App\Admin\Controllers) for classes that use the PageDesignItem trait. Generate an admin controller for your model (the Helpers scaffold does this), add the trait and describe the block in pageDesign(); the published example controllers show the expected keys (type, model, parent_field, title, icon, optional path).
To list the block controllers yourself instead of scanning (2.0+):
'extensions' => [
'page-designer' => [
'item_controllers' => [
App\Admin\Controllers\PageDesignerTextController::class,
App\Admin\Controllers\PageDesignerImagesController::class,
],
],
],
Compatibility
| Laravel | PHP | State |
|---|---|---|
| 8 – 13 | 8.0+ | Works after the example is published and the routes are added. |
The class PageDesignerExtention was renamed PageDesignerExtension in 2.0; the old name still works.