@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 = ['foto_gistaru', 'foto_bhumi', 'foto_argis_region', 'foto_tempat', 'foto_sentuh_tanahku']; 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