Core Integration

Standalone Page Builder Integration

Implement the builder in a plain Laravel flow without SDK dependencies.

Standalone Page Builder Integration

After php artisan tagixo:install, the plugin sets up everything you need to start building pages — no custom Blade layout, no custom controllers, no custom routes required.

What tagixo:install sets up for you

One command handles the entire installation:

php artisan tagixo:install

It runs all migrations (creating every tgx_* table), seeds the global layout, global variables, and a default mail template. It publishes the builder assets to public/vendor/tagixo/, publishes config/tagixo.php, and sets enable_default_types = true — which auto-registers DefaultPageType, DefaultMailType, and DefaultPdfType. Optionally it seeds starter content: an empty homepage (ID 1), a main menu, and a default header and footer on the global layout.

The builder is already there

After install, navigate to:

/tagixo/builder/embed?type=pages&id=1

That opens the visual builder for the starter homepage. No Blade file to create, no bootstrap endpoint to write. The plugin's BuilderEmbedController serves the complete builder SPA.

The builder URL accepts:

Parameter Description
type Entity type: pages, mails, pdfs
id The entity's database ID
back (optional) URL to return to when closing the builder

Authentication is required. The builder uses tagixo.route_middleware from config/tagixo.php (default: ['web', 'auth']). Make sure a Laravel user exists before opening the builder.

Creating pages

Use the Page model directly from your own admin controller:

use Ccast\Tagixo\Models\Page;

$page = Page::create([
    'title'  => 'About Us',
    'slug'   => 'about-us',
    'status' => 'draft',
]);

return redirect(
    '/tagixo/builder/embed?type=pages&id=' . $page->id
    . '&back=' . urlencode(route('admin.pages.index'))
);

For forms, sliders, and popups the plugin also provides a dedicated "create + redirect" route:

GET /tagixo/forms/new      → creates form, opens builder
GET /tagixo/sliders/new    → creates slider, opens builder
GET /tagixo/popups/new     → creates popup, opens builder

Publishing pages

From the builder toolbar, click Publish. Or via the model:

$page = Page::find(1);
$page->publish();   // status → 'published'
$page->unpublish(); // status → 'draft'

Serving published pages to visitors

Option A — Auto-routes (zero code)

Add to .env:

TAGIXO_FRONTEND_AUTO_ROUTES=true

Then clear caches:

php artisan optimize:clear

Published pages are now served automatically at /{slug}. A published page with slug home is available at /home. The catch-all uses Route::fallback() — it only fires for URLs not claimed by your own routes.

Option B — Blade component in your own layout

Use <x-tagixo::page> inside any Blade view you control:

{{-- resources/views/public/show.blade.php --}}
<!DOCTYPE html>
<html>
<head>
    <title>{{ $page->title }}</title>
</head>
<body>
    <x-tagixo::page :page="$page" />
</body>
</html>

In your controller:

use Ccast\Tagixo\Models\Page;

public function show(string $slug)
{
    $page = Page::where('slug', $slug)
                ->where('status', 'published')
                ->firstOrFail();

    return view('public.show', compact('page'));
}

The component handles font loading, global CSS variables, and the full layout (header + content + footer) automatically.

Option C — PageRenderer directly

For maximum control over the output:

use Ccast\Tagixo\Renderers\PageRenderer;
use Ccast\Tagixo\Models\Page;

public function show(string $slug)
{
    $page = Page::published()->where('slug', $slug)->firstOrFail();
    $renderer = app(PageRenderer::class);

    return response(
        $renderer->generateFontLinks($page->content['components'] ?? [])
        . '<style>' . $renderer->generateGlobalVariablesCss() . '</style>'
        . $renderer->renderWithLayout($page)
    );
}

The <x-tagixo::edit-button> component

Renders an "Edit in Builder" link visible only to authenticated visitors:

<x-tagixo::edit-button :record="$page" />

Links to /tagixo/builder/embed?type=pages&id={id}&back={current_url} and is invisible to unauthenticated users. Useful for quick frontend edits during content management.

Optional props:

Prop Default Description
:type 'pages' Entity type: 'mails', 'pdfs', 'forms', 'sliders', 'popups'
:label 'Edit in Builder' Button text
:class '' Additional CSS classes

Customising the builder view

Publish the plugin's Blade views if you need to wrap the builder in custom chrome (analytics scripts, custom header, etc.):

php artisan vendor:publish --tag=tagixo-views

The builder embed view will appear at resources/views/vendor/tagixo/builder/embed.blade.php.

Builder entity types reference

Entity Create new Open builder
Pages POST /tagixo/manage/pages /tagixo/builder/embed?type=pages&id={id}
Mail templates POST /tagixo/manage/mails /tagixo/builder/embed?type=mails&id={id}
PDF templates POST /tagixo/manage/pdfs /tagixo/builder/embed?type=pdfs&id={id}
Forms GET /tagixo/forms/new /tagixo/forms/{id}/edit
Sliders GET /tagixo/sliders/new /tagixo/sliders/{id}/edit
Popups GET /tagixo/popups/new /tagixo/popups/{id}/edit
Global Blocks GET /tagixo/global-blocks/new /tagixo/global-blocks/{id}/edit

All endpoints require authentication via tagixo.route_middleware (default: ['web', 'auth']).

See also