@if (isset($formFoto['rute_menuju_lokasi']['rute_menuju_lokasi']))
@foreach ($formFoto['rute_menuju_lokasi']['rute_menuju_lokasi'][0] as $index => $item)
{{ $item['name'] . ' ' . $loop->index + 1 }}
@php
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
![{{ $item['path'] }}]({{ $imagePath }})
@endif
@endforeach
@endif
@if (isset($formFoto['foto_rute_lainnya']))
@foreach ($formFoto['foto_rute_lainnya'] as $index => $item)
{{ $item['name_rute_lainnya'] }}
@php
$imagePath = storage_path('app/public/' . $item['foto_rute_lainnya']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['foto_rute_lainnya'])))
![{{ $item['foto_rute_lainnya'] }}]({{ $imagePath }})
@endif
@endforeach
@endif
@if (!empty($formFoto['object_jaminan']))
@foreach ($formFoto['object_jaminan'] as $item)
@php
$nameObjek = trim($item['name_objek'] ?? '');
$fotoObjek = trim($item['foto_objek'] ?? '');
$imagePath = storage_path('app/public/' . $fotoObjek);
@endphp
@if (!empty($nameObjek) || !empty($fotoObjek))
@if (!empty($nameObjek))
{{ $nameObjek }}
@endif
@if ($statusLpj || (!empty($fotoObjek) && file_exists($imagePath)))

@else
Foto tidak tersedia
@endif
@endif
@endforeach
@else
Tidak ada objek jaminan yang ditemukan
@endif
@if (isset($formFoto['foto_lantai_unit']))
@foreach ($formFoto['foto_lantai_unit'] as $index => $floorPhotos)
@foreach ($floorPhotos as $index => $item)
{{ $item['name'] ?? 'Foto Lantai ' . $floorNumber . ' - ' . ($index + 1) }}
@php
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
![{{ $item['path'] }}]({{ $imagePath }})
@endif
@endforeach
@endforeach
@endif
@if (isset($formFoto['foto_lingkungan']['foto_lingkungan']))
@foreach ($formFoto['foto_lingkungan']['foto_lingkungan'][0] as $index => $item)
{{ $item['name'] . ' ' . $loop->index + 1 }}
@php
$imagePath = storage_path('app/public/' . $item['path']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $item['path'])))
![{{ $item['path'] }}]({{ $imagePath }})
@endif
@endforeach
@endif
@if (isset($formFoto['foto_basement']))
Basement
@php
$imagePath = storage_path('app/public/' . $formFoto['foto_basement']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['foto_basement'])))
![{{ $formFoto['foto_basement'] }}]({{ $imagePath }})
@endif
@endif
@if (isset($formFoto['foto_gerbang']))
Gerbang
@php
$imagePath = storage_path('app/public/' . $formFoto['foto_gerbang']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['foto_gerbang'])))
![{{ $formFoto['foto_gerbang'] }}]({{ $imagePath }})
@endif
@endif
@if (isset($formFoto['pendamping']))
Pendamping
@php
$imagePath = storage_path('app/public/' . $formFoto['pendamping']);
@endphp
@if ($statusLpj || file_exists(storage_path('app/public/' . $formFoto['pendamping'])))
![{{ $formFoto['pendamping'] }}]({{ $imagePath }})
@endif
@endif