{{-- Documents: uploads, scanned copies, photographs (with GPS position), progress reports --}} @php $docTypes = \App\Http\Controllers\ProbationAssessmentController::documentTypes(); if ($case->case_type !== 'probation_hostel') $docTypes = array_diff_key($docTypes, config('probation.case_document_types_hostel', [])); $isImage = fn ($p) => preg_match('/\.(jpe?g|png|gif|webp)$/i', (string) $p); @endphp
Documents, scans & photographs
@forelse($case->documents->sortByDesc('id') as $d)
@if($isImage($d->file_path)) @else @endif
{{ $docTypes[$d->doc_type] ?? ($d->title ?? $d->doc_type) }}
{{ optional($d->captured_on ?? $d->created_at)->format('d M Y') }}
@if($d->notes)
{{ $d->notes }}
@endif @if($d->latitude)@endif Open
@empty

No documents uploaded.

@endforelse
@csrf