@extends('layouts.admin') @section('title', 'Edit Page') @section('eyebrow', 'Page Editor') @section('heading', $page->name) @section('header_actions')
Back to Pages Preview Page
@endsection @section('content') @php $pageSections = $pageSections ?? $page->sectionMap(); $heroSlides = collect(old('hero_slide_images', []))->isNotEmpty() ? collect(old('hero_slide_images', []))->values()->map( fn ($image, $index) => [ 'image' => $image, 'label' => old("hero_slide_labels.$index"), ], )->all() : array_values($pageSections['hero_slides'] ?? []); if ($page->slug === 'home') { $heroSlides = array_pad($heroSlides, 5, ['image' => '', 'label' => '']); } $homeHero = array_merge([ 'eyebrow' => '', 'headline' => '', 'subheadline' => '', 'primary_label' => '', 'secondary_label' => '', ], old('hero', $pageSections['hero'] ?? [])); $homeFeaturesSection = array_merge([ 'title' => '', ], old('features_section', $pageSections['features_section'] ?? [])); $homeTreatmentsSection = array_merge([ 'eyebrow' => '', 'title' => '', ], old('treatments_section', $pageSections['treatments_section'] ?? [])); $homeStepsSection = array_merge([ 'eyebrow' => '', 'title' => '', ], old('steps_section', $pageSections['steps_section'] ?? [])); $homeReasonsSection = array_merge([ 'title' => '', ], old('reasons_section', $pageSections['reasons_section'] ?? [])); $homeTherapistsSection = array_merge([ 'title' => '', 'subtitle' => '', ], old('therapists_section', $pageSections['therapists_section'] ?? [])); $homeTestimonialsSection = array_merge([ 'eyebrow' => '', 'title' => '', ], old('testimonials_section', $pageSections['testimonials_section'] ?? [])); $homeFeatures = array_pad(old('features_items', $pageSections['features_items'] ?? []), 6, ['icon' => '', 'title' => '', 'text' => '']); $homeSteps = array_pad(old('steps_items', $pageSections['steps_items'] ?? []), 5, ['icon' => '', 'title' => '', 'desc' => '']); $homeReasons = array_pad(old('reasons_items', $pageSections['reasons_items'] ?? []), 5, ['icon' => '', 'text' => '']); $aboutHighlights = array_pad(old('about_highlights', $pageSections['about_highlights'] ?? []), 3, ['label' => '', 'title' => '', 'text' => '']); $aboutStory = array_merge([ 'eyebrow' => '', 'title' => '', 'intro' => '', 'vision_title' => '', 'vision_text' => '', 'mission_title' => '', 'mission_text' => '', 'promise_title' => '', 'promise_text' => '', 'reasons_title' => '', 'reasons_copy' => '', 'image' => '', ], old('about_story', $pageSections['about_story'] ?? [])); $aboutReasons = array_pad(old('reason_items', $pageSections['reason_items'] ?? []), 5, ['icon' => '', 'text' => '']); $treatmentHighlights = array_pad(old('treatments_highlights', $pageSections['treatments_highlights'] ?? []), 3, ['label' => '', 'title' => '', 'text' => '']); $pricingHighlights = array_pad(old('pricing_highlights', $pageSections['pricing_highlights'] ?? []), 3, ['label' => '', 'title' => '', 'text' => '']); $therapistHighlights = array_pad(old('therapist_highlights', $pageSections['therapist_highlights'] ?? []), 3, ['label' => '', 'title' => '', 'text' => '']); $contactItems = array_pad(old('contact_items', $pageSections['contact_items'] ?? []), 4, ['icon' => '', 'label' => '', 'value' => '', 'href' => '']); $serviceAreaHighlights = array_pad(old('service_area_highlights', $pageSections['service_area_highlights'] ?? []), 3, ['label' => '', 'title' => '', 'text' => '']); $faqItems = array_pad(old('faq_items', $pageSections['faq_items'] ?? []), 8, ['question' => '', 'answer' => '']); $bookingHighlights = array_pad(old('booking_highlights', $pageSections['booking_highlights'] ?? []), 3, ['label' => '', 'title' => '', 'text' => '']); $bookingChecklist = array_pad(old('booking_checklist', $pageSections['booking_checklist'] ?? []), 6, ''); $bookingSteps = array_pad(old('booking_steps', $pageSections['booking_steps'] ?? []), 5, ['title' => '', 'text' => '']); @endphp
@csrf @method('PUT')

Content

@if ($page->slug === 'home')

Home Hero Copy

Home Section Headings

Home Hero Slides

Edit the landing-page slider here. You can use a relative asset path like `images/hero-bg.jpg` or a full image URL.

Recommended hero image size: 1920 x 1080 px minimum, ideally 2400 x 1350 px, 16:9 landscape, optimized JPG or WEBP, preferably under 2 MB.

@foreach ($heroSlides as $index => $slide)

Slide {{ $index + 1 }}

@if (! empty($slide['image']))

Current preview

Hero slide {{ $index + 1 }} preview
@endif
@endforeach

Home Features

@foreach ($homeFeatures as $index => $item)

Feature {{ $index + 1 }}

@endforeach

Home Featured Therapist Cards

The homepage featured therapist cards now come from the dedicated therapist module. Update names, photos, ordering, and featured status there instead of in page JSON.

Home Treatments

Homepage treatment cards are now pulled from the treatments module. Edit treatment names, icons, durations, price-from labels, images, and descriptions there.

Home Booking Steps

@foreach ($homeSteps as $index => $item)

Step {{ $index + 1 }}

@endforeach

Home Reasons

@foreach ($homeReasons as $index => $item)

Reason {{ $index + 1 }}

@endforeach

Home Therapists

The homepage therapist carousel now uses the therapist module. Use the therapist module to control profiles, ordering, images, and featured visibility.

Home Testimonials

Homepage testimonials now come from the testimonials module. Manage quotes, author names, ordering, and published status there.

@endif @if ($page->slug === 'about')

About Highlights

@foreach ($aboutHighlights as $index => $item)

Highlight {{ $index + 1 }}

@endforeach
@if (! empty($aboutStory['image']))

Current preview

About page image preview
@endif

About Reasons

@foreach ($aboutReasons as $index => $item)

Reason {{ $index + 1 }}

@endforeach
@endif @if ($page->slug === 'treatments')

Treatment Highlights

@foreach ($treatmentHighlights as $index => $item)

Highlight {{ $index + 1 }}

@endforeach

Treatment Details

Treatment cards on the public treatments page are now controlled by the treatments module. Use that module for treatment names, imagery, description, icons, and price-from details.

@endif @if ($page->slug === 'pricing')

Pricing Highlights

@foreach ($pricingHighlights as $index => $item)

Highlight {{ $index + 1 }}

@endforeach

Pricing Tables

Pricing tables are now powered by the pricing rates module. Each row is managed separately so durations and rates stay consistent and easier to maintain.

@endif @if ($page->slug === 'therapists')

Therapist Highlights

@foreach ($therapistHighlights as $index => $item)

Highlight {{ $index + 1 }}

@endforeach

Therapist Profiles

Therapist profile cards are now managed in the therapist module. Update profile codes, ages, photos, bios, ordering, and featured status there.

@endif @if ($page->slug === 'contact')

Contact Items

@foreach ($contactItems as $index => $item)

Item {{ $index + 1 }}

@endforeach
@endif @if ($page->slug === 'service-areas')

Service Area Highlights

@foreach ($serviceAreaHighlights as $index => $item)

Highlight {{ $index + 1 }}

@endforeach

Service Areas

Service area cards are now managed in the service areas module. Update area names, tags, descriptions, ordering, and published status there.

@endif @if ($page->slug === 'faq')

FAQ Items

@foreach ($faqItems as $index => $item)

FAQ {{ $index + 1 }}

@endforeach
@endif @if ($page->slug === 'book-now')

Booking Highlights

@foreach ($bookingHighlights as $index => $item)

Highlight {{ $index + 1 }}

@endforeach

Booking Checklist

@foreach ($bookingChecklist as $index => $item) @endforeach

Booking Steps

@foreach ($bookingSteps as $index => $item)

Step {{ $index + 1 }}

@endforeach
@endif

SEO Basics

Stored for planning and compatibility. Titles, descriptions, content, internal links, schema, and local trust signals matter more.

Social & Schema

@if (old('og_image', $page->og_image))

Current social preview image

Open Graph image preview
@endif

Publishing

is_published)) class="h-5 w-5 rounded border-white/20 bg-transparent text-accent focus:ring-accent/20">
Cancel
@endsection