PHP code example of webkleur / builder

1. Go to this page and download the library: Download webkleur/builder library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

webkleur / builder example snippets


use Illuminate\Database\Eloquent\Model;
use Webkleur\Builder\App\Traits\EditableTrait;
use Webkleur\Builder\App\Contracts\Editable;

class Page extends Model implements Editable
{
    use EditableTrait;

    ...
}

Route::get('pages/{page}/editor', 'PageController@editor');




namespace App\Http\Controllers;

use App\Models\Page;
use Illuminate\Http\Request;
use Webkleur\Builder\App\Traits\EditorTrait;

class PageController extends Controller
{
    use EditorTrait;

    ...


    public function editor(Request $request, Page $page)
    {
        return $this->show_gjs_editor($request, $page);
    }

    ...
}



public function getTemplatesPath(){ return 'pages_templates'; }