@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' }}

@endforeach @endif @endisset @php $fotoTypes = ['upload_gs','foto_sentuh_tanahku','foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat']; $customLabels = [ 'upload_gs' => 'Gambar Situasi', 'foto_sentuh_tanahku' => 'Sentuh Tanahku', 'foto_gistaru' => 'Gistaru', 'foto_bhumi' => 'Bhumi', 'foto_argis_region' => 'Region', 'foto_tempat' => 'Tempat', ]; if (($key = array_search('upload_gs', $fotoTypes)) !== false) { unset($fotoTypes[$key]); array_unshift($fotoTypes, 'upload_gs'); } $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, dan tata ruang, blad

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

{{ $customLabels[$type] ?? '' }}

@empty

Tidak ada tipe foto yang tersedia

@endforelse @endif
@endif