@isset($basicData['foto']) @php $photos = $formFoto['upload_foto'] ?? []; if (!is_array($photos)) { $photos = []; } $groupedPhotos = collect($photos)->groupBy('category'); @endphp @if ($groupedPhotos->isEmpty())

Tidak ada foto yang tersedia.

@else @foreach ($groupedPhotos as $category => $photos)

{{ $category ?? 'Tanpa Kategori' }}

@php $groupedBySubcategory = $photos->groupBy('sub'); @endphp @if ($groupedBySubcategory->isEmpty()) @foreach ($photos as $index => $item)

{{ $item['name'] ?? 'Foto - ' . ($index + 1) }}

@if (isset($item['path'])) Gambar {{ $index + 1 }} @else

Gambar tidak tersedia

@endif

{{ $item['description'] ?? '-' }}

@endforeach @else @foreach ($groupedBySubcategory as $subcategory => $subPhotos)

@if ($subcategory) {{ $subcategory }} @endif

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

{{ $item['name'] ?? 'Foto - ' . ($index + 1) }}

@if (isset($item['path'])) Gambar {{ $index + 1 }} @else

Gambar tidak tersedia

@endif

{{ $item['description'] ?? '-' }}

@endforeach
@endforeach @endif
@endforeach @endif @endisset @php $fotoTypes = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat']; if (($key = array_search('foto_tempat', $fotoTypes)) !== false) { unset($fotoTypes[$key]); array_unshift($fotoTypes, 'foto_tempat'); } $adaFoto = false; if (isset($forminspeksi)) { foreach ($fotoTypes as $type) { $imagePath = $forminspeksi[$type] ?? null; if ($imagePath && file_exists(storage_path('app/public/' . $imagePath))) { $adaFoto = true; break; } } } @endphp @if ($adaFoto)

Peta

@if (isset($forminspeksi)) @forelse ($fotoTypes as $type)
@php $imagePath = $forminspeksi[$type] ?? null; @endphp @if ($imagePath && file_exists(storage_path('app/public/' . $imagePath))) {{ $type }} @endif

{{ Str::title(str_replace('_', ' ', $type)) }}

@empty

Tidak ada tipe foto yang tersedia

@endforelse @endif
@endif