{{-- Geo-tagged location photos uploaded from the mobile field app --}} @php $photos = $pciLocationPhotos ?? collect(); @endphp @if($photos->isNotEmpty())
Field Location Photos {{ $photos->count() }}
@foreach($photos as $photo) @php $photoUrl = route('pc-forms.location-photo', ['photo' => $photo->id]); $locName = trim((string) ($photo->name_of_location ?? '')); $lat = $photo->latitude ? number_format((float) $photo->latitude, 6) : ''; $lng = $photo->longitude ? number_format((float) $photo->longitude, 6) : ''; $gps = ($lat && $lng) ? "{$lat}, {$lng}" : ''; $capturedAt = $photo->captured_at ? $photo->captured_at->format('d M Y, h:i A') : ''; @endphp
{{ e($locName ?: 'Location photo') }}
@if($locName || $gps)
@if($locName)
{{ $locName }}
@endif @if($gps)
{{ $gps }}
@endif
@endif
@endforeach
{{-- Lightbox (one per page) --}} @endif