@extends('layouts.admin') @section('title', 'Edit Home Page') @section('page-title', 'home page') @push('styles') @endpush @section('content') @php $imageUrl = fn ($path) => asset_image($path); $val = fn ($key, $default = '') => old('content.'.$key, $values[$key] ?? $default); @endphp

Home Page

@csrf @method('PUT')
    @foreach($groups as $group => $fields)
  • {{ $group }}
  • @endforeach
@foreach($groups as $group => $fields)
@foreach($fields as $field) @php $value = $val($field['key'], $field['default'] ?? ''); @endphp
@if($field['type'] === 'html') @elseif($field['type'] === 'textarea') @elseif($field['type'] === 'image')
@if($value){{ $field['label'] }}@endif
@else @endif
@endforeach @if($group === 'Hero')
Banner Slides (Desk 2500 × 1593 / Mob 600 × 1046) — drag ⋮⋮ to reorder (saves automatically)
@foreach($banners as $item)
⋮⋮
@if(!empty($item->desktop_image))@endif
@if(!empty($item->mobile_image))@endif
@endforeach @if($banners->isEmpty())
No banners yet — upload a desktop image to add the first.
@endif
@endif @if($group === 'Projects') @elseif($group === 'News') @elseif($group === 'Blog') @endif @if($group === 'Promise') @include('admin.home.partials.gallery-cards', [ 'repeater' => 'promises', 'label' => 'Promise Items (663 × 629)', 'items' => $promises, 'empty' => 'No promise items yet — upload an image to add the first.', 'prefix' => 'promise', 'titleKey' => 'title', 'descKey' => 'description', 'imageKey' => 'image', ]) @endif @if($group === 'Lifestyle') @include('admin.home.partials.gallery-cards', [ 'repeater' => 'amenities', 'label' => 'Amenities (1031 × 735)', 'items' => $amenities, 'empty' => 'No amenities yet — upload an image to add the first.', 'prefix' => 'amenity', 'titleKey' => 'title', 'descKey' => 'description', 'imageKey' => 'image', ]) @endif @if($group === 'Partners')
Partner Logos (≈300 × 60)
@foreach($partners as $item)
@if(!empty($item->image))@endif
@endforeach @if($partners->isEmpty())
No partners yet — upload a logo to add the first.
@endif
@endif @if($group === 'Stories')
Brand Stories (Desk 2091 × 1018 / Mob 537 × 316)
@foreach($stories as $item)
@if(!empty($item->desktop_image))@endif
@if(!empty($item->mobile_image))@endif
@endforeach @if($stories->isEmpty())
No stories yet — upload a desktop image to add the first.
@endif
@endif @if($group === 'Testimonials')
Happy Families (Rating 270 × 42)
@foreach($families as $item)
@if(!empty($item->rating_image))@endif
@endforeach @if($families->isEmpty())
No family quotes yet — click Add Quote.
@endif
Video Testimonials
Max 10 MB · MP4 / WEBM / MOV
@foreach($testimonials as $item)
@if(!empty($item->video_url)) @endif
@endforeach @if($testimonials->isEmpty())
No video testimonials yet — upload a video to add the first.
@endif
@endif
@endforeach
@endsection @push('scripts') @endpush