Installation
Livewire Page Builder is a Laravel package that allows you to create pages using a drag-and-drop interface. You can use the default components or create your own.
License
Livewire Page Builder is a paid package. You can get a license here.
Getting Started
Setup the composer repository
composer config repositories.livewire-page-builder composer https://livewire-page-builder.composer.sh
Install the package
composer require softis/livewire-page-builder
Publish the config file
php artisan vendor:publish --provider="LivewirePageBuilder\LivewirePageBuilderServiceProvider" --tag="config"
Publish the layouts
php artisan vendor:publish --provider="LivewirePageBuilder\LivewirePageBuilderServiceProvider" --tag="layouts"
Builder page setup
<?php
namespace App\Livewire;
use Livewire\Attributes\On;
use Livewire\Component;
#[Layout('lpb-layouts.builder-layout')]
class BuilderPage extends Component
{
public $content = [];
#[On('lpb-save-page')]
public function savePage($data)
{
// handle the data saving and redirect
}
public function render()
{
return view('livewire.builder-page');
}
}
Blade file:
<div>
<livewire:lpb.builder :content="$content" />
</div>
Custom layout
In case you want to use a custom layout for the builder, you need to include the assets in the head of the builder layout.
<head>
...
@lpbStyles
</head>