@php $inputClass = 'mt-1 w-full rounded-xl border border-slate-200 bg-slate-50 px-4 py-2.5 text-sm text-slate-800 placeholder:text-slate-400 shadow-sm focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-2 focus:ring-blue-500/20'; $textareaClass = 'mt-1 w-full rounded-xl border border-slate-200 bg-slate-50 px-4 py-2.5 text-sm text-slate-800 placeholder:text-slate-400 shadow-sm focus:border-blue-500 focus:bg-white focus:outline-none focus:ring-2 focus:ring-blue-500/20'; $cardClass = 'space-y-4 rounded-2xl border border-slate-200 bg-white p-6 shadow-sm'; $sectionMeta = [ 'hero' => ['title' => 'Kelola Hero Section', 'desc' => 'Atur branding utama, heading, subtitle, tombol CTA, dan gambar hero.'], 'transform' => ['title' => 'Kelola Transformasi', 'desc' => 'Perbarui item before/after untuk menunjukkan hasil proyek.'], 'about' => ['title' => 'Kelola Tentang Kami', 'desc' => 'Ubah narasi profil perusahaan dan statistik utama.'], 'services' => ['title' => 'Kelola Layanan', 'desc' => 'Edit daftar layanan dan deskripsi tiap layanan.'], 'gallery' => ['title' => 'Kelola Galeri', 'desc' => 'Atur judul galeri serta gambar proyek pada landing page.'], 'contact' => ['title' => 'Kelola Kontak & Maps', 'desc' => 'Update info kontak, jam operasional, dan URL embed Google Maps.'], 'footer' => ['title' => 'Kelola Footer', 'desc' => 'Atur identitas footer, copyright, dan tautan kebijakan.'], ]; $meta = $sectionMeta[$section] ?? ['title' => 'Kelola Section', 'desc' => 'Atur konten section ini.']; @endphp

CMS Section

{{ $meta['title'] }}

{{ $meta['desc'] }}

@if (session('status'))
{{ session('status') }}
@endif @if ($errors->any())

Terdapat validasi error:

    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif @if (!in_array($section, ['transform', 'gallery', 'contact'], true))
@csrf @method('PUT') @endif @if ($section === 'hero')

Hero Section

@elseif ($section === 'transform')

Section Transformasi

CRUD via modal. Default seed 5 data.

@csrf @method('PUT')
@foreach ($content['transform']['items'] as $index => $item) @endforeach
# Judul Before After Action
{{ $index + 1 }} {{ $item['title'] }}

Create Transform

@csrf

Edit Transform

@csrf @method('PUT')

Hapus Transform

Hapus row ?

@csrf @method('DELETE')
@elseif ($section === 'about')

Section Tentang

@foreach ($content['about']['paragraphs'] as $index => $paragraph) @endforeach
@foreach ($content['about']['stats'] as $index => $stat)
@endforeach
@elseif ($section === 'services')

Section Layanan

@foreach ($content['services']['items'] as $index => $item)
@endforeach
@elseif ($section === 'gallery')

Section Galeri Proyek

CRUD via modal dan data tersimpan di tabel gallery terpisah.

@csrf @method('PUT')
@foreach ($content['gallery']['items'] as $index => $item) @endforeach
# Judul Image Action
{{ $index + 1 }} {{ $item['title'] }}

Create Gallery

@csrf

Edit Gallery

@csrf @method('PUT')

Hapus Gallery

Hapus row ?

@csrf @method('DELETE')
@elseif ($section === 'contact')

Section Kontak & Google Maps

@csrf @method('PUT')

Floating WhatsApp (CRUD)

Nomor pertama akan dipakai untuk tombol floating WhatsApp di landing page.

@foreach ($content['contact']['whatsapp_items'] ?? [] as $index => $item) @endforeach
# Label Nomor Message Action
{{ $index + 1 }} {{ $item['title'] }} {{ $item['number'] }} {{ $item['message'] ?? '' }}

Create WhatsApp

@csrf

Edit WhatsApp

@csrf @method('PUT')

Hapus WhatsApp

Hapus nomor ?

@csrf @method('DELETE')
@elseif ($section === 'footer')

Footer

@endif @if (!in_array($section, ['transform', 'gallery', 'contact'], true))
@endif