@section('title', $page->meta_title ?? $page->title) @section('description', $page->meta_description) @section('keywords', is_array($page->meta_keywords) ? implode(', ', $page->meta_keywords) : $page->meta_keywords) @php $pageData = [ 'title' => $page->title, 'content_type' => gettype($page->content), 'content' => collect($page->content)->toArray(), 'custom_html' => $page->custom_html, ]; file_put_contents('/tmp/preview_debug.log', "--- BLADE RENDER ---\n" . json_encode($pageData, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE) . "\n", FILE_APPEND); @endphp {{-- Full HTML page (when custom_html is set) --}} @if(!empty($page->custom_html))
{!! $page->custom_html !!}
{{-- Render Content Blocks --}} @elseif(!empty($page->content)) @foreach($page->content as $block) @php $type = $block['type'] ?? ''; $data = $block['data'] ?? null; @endphp @if(!empty($type) && is_array($data)) @switch($type) @case('hero_slider') @break @case('package_grid') @break @case('features') @break @case('cta') @break @case('html') @break @case('prisma_hero') @break @case('prisma_hero_grid') @break @case('prisma_categories') @break @case('prisma_packages') @break @case('prisma_about') @break @case('prisma_services') @break @case('prisma_faq') @break @case('prisma_cta') @break @case('prisma_separator') @break @case('custom_form') @break @endswitch @endif @endforeach @else {{-- Default content if no blocks and no custom_html --}}

{{ $page->title }}

@if($page->description)

{{ $page->description }}

@endif
@endif