@extends('admin.layout') @section('title', 'Edit Page — '.$page->title) @section('content')

{{ $page->title }}

@if ($page->is_published) Published @else Draft — not visible to visitors @endif
@csrf
@if ($page->is_reserved)
Built-in page. @if ($page->is_published) You're editing the live version of this page — visitors currently see the blocks below. Click "Unpublish" above any time to instantly go back to the default design. @else The blocks below have been pre-filled to match the current live design, but the page itself is not published yet — visitors still see the normal default page. Edit the blocks, use "Preview" below to check how it looks, then click "Publish" above when you're happy with it. @endif
@endif @php $reservedUrls = ['home' => '/', 'models' => '/models', 'promotions' => '/promotions', 'news' => '/news', 'faq' => '/faq']; $liveUrl = $page->is_reserved ? ($reservedUrls[$page->slug] ?? '/') : route('pages.show', $page); @endphp
@if (!$page->isVisual()) Preview → @endif @if ($page->is_published) View live page → @endif
@if ($page->isVisual())

Visual Drag & Drop Page

Design this page freely — drag, drop, and style any element, no fixed sections.

Open Visual Designer →
@else
{{-- CANVAS: a live preview of the real page, edited in place. Drag a block type from the panel on the right onto it to add a section; drag a block's ⠿ handle up/down to reorder it. --}}

This is what the page actually looks like. Click any text to edit it right here, drag a block from the right to add a section, or drag a block's ⠿ handle to reorder it.

@forelse ($page->blocks as $block)
@include('blocks.'.$block->type, ['data' => $block->data, 'adminEditable' => true])
@empty
No blocks yet. Drag a block from the panel on the right to get started.
@endforelse
{{-- TOOLS PANEL --}}

Add a Block

Drag one onto the page, or click to add it to the end.

@foreach (\App\Models\PageBlock::types() as $key => $label) {{ $label }} @endforeach
Page Settings
@csrf @method('PUT') @include('admin.pages._form')
@endif @endsection