@extends('admin.layouts.app') @section('title', 'Kelola Galeri') @section('content')

Kelola Galeri Desa

Tambah Foto
@if(isset($galeris) && $galeris->count() > 0) @php $totalFotos = $galeris->count(); $withImages = $galeris->whereNotNull('gambar')->count(); $activeItems = $galeris->where('is_active', true)->count(); $categoriesCount = $galeris->whereNotNull('kategori')->pluck('kategori')->unique()->count(); @endphp
Total Foto

{{ $totalFotos }}

Dengan Gambar

{{ $withImages }}

Aktif

{{ $activeItems }}

Kategori

{{ $categoriesCount }}

@endif {{-- Category-first view: show categories when no category is selected --}} @if(empty($selectedKategori))
Pilih Kategori Galeri
{{ isset($categories) ? $categories->count() : 0 }} Kategori
@forelse(($categories ?? collect()) as $category) @empty
Belum ada kategori galeri.
@endforelse
@endif @if(!empty($selectedKategori) && isset($galeris) && $galeris->count() > 0)
{{ $galeris->total() }} Total Item
@foreach($galeris as $item)
@if($item->gambar) {{ $item->judul }} @else
@endif
@if($item->is_active ?? true) @else @endif
@if($item->kategori)
{{ $item->kategori }}
@endif
{{ Str::limit($item->judul, 50) }}
@if($item->deskripsi)

{{ Str::limit($item->deskripsi, 80) }}

@endif
{{ $item->created_at->format('d/m/Y') }}
@endforeach
Daftar Galeri (Table View)
@foreach($galeris as $index => $item) @endforeach
No Gambar Judul Kategori Status Tanggal Aksi
{{ $galeris->firstItem() + $index }} @if($item->gambar) {{ $item->judul }} @else
@endif
{{ $item->judul }}
@if($item->deskripsi) {{ Str::limit($item->deskripsi, 50) }} @endif
@if($item->kategori) {{ $item->kategori }} @else - @endif @if($item->is_active ?? true) Aktif @else Tidak Aktif @endif {{ $item->created_at->format('d/m/Y H:i') }}
{{ $galeris->links() }}
@elseif(empty($selectedKategori))

Belum Ada Foto Galeri

Mulai dengan menambahkan foto kegiatan atau acara desa pertama untuk mempercantik website.

Tambah Foto Pertama
@endif
@endsection