Appearance
🛠️ Developer Guide: Technical Reference
Builder & Slider: Technical Reference
Technical documentation for the WaravelBuilder and WaravelSlider visual design plugins: data persistence, security gates, and responsive schema logic.
WaravelBuilder: Architecture
The Builder is a JSON-driven visual editor that integrates directly with the core page model.
Data Persistence
- Table Modification: On activation, the plugin adds a
builder_data(longText/JSON) column to thewaravel_pagestable. - Reusable Components: The
waravel_builder_templatestable stores serialized JSON snippets of page sections.
Security & Access Control
- IDOR Protection: Implements a dedicated Laravel Gate (
update-builder-page). - AJAX Validation: Every block-level save request is validated against the
Pagemodel's ownership and the user'swaravel-adminpermission level.
WaravelSlider: Engine Logic
The Slider engine uses a parent-child relationship to manage complex slide groups.
Relational Structure
waravel_sliders: Parent container storing global settings (heights, widths, speed, transitions).waravel_slides: Child items storing specific content, images, and CTA button data.
Responsive Design Schema
The slider configuration stores a multi-dimensional array of dimensional constraints:
height_desktop,height_tablet,height_mobilemax_widthcontain_mode(cover vs. contain)
Shortcode Resolver
The plugin registers a shortcode with the ShortcodeManager:
php
Shortcode::register('waravel-slider', function($attr) {
$slider = Slider::with('slides')->find($attr['id']);
return view('waravel::plugins.slider.render', compact('slider'));
});UI Components
- Drag-and-Drop: Built using Alpine.js and SortableJS for high-performance reordering.
- Real-time Preview: Uses an
<iframe>bridge to render the live slider/builder state without CSS collisions from the dashboard.