@if(Session::has('success'))
{{ Session::get('success') }}
@endif
@if(Session::has('error'))
{{ Session::get('error') }}
@endif
@if ($issuer->user->documents->count())
Uploaded Documents
@php
$groupedDocs = $issuer->user->documents->groupBy('doc_type');
// Fixed order of categories
$order = ['incorporation_doc', 'business_license', 'tax_doc'];
// Filter and order grouped docs by the above order array
$sortedDocs = collect($order)
->filter(fn($key) => $groupedDocs->has($key))
->mapWithKeys(fn($key) => [$key => $groupedDocs->get($key)]);
@endphp
@foreach($sortedDocs as $docType => $docs)
{{ ucfirst(str_replace('_', ' ', $docType)) }}
| File |
Status |
Actions |
@foreach($docs as $doc)
|
{{ basename($doc->file_path) }}
|
{{ $doc->signed_status ? 'Approved' : 'Pending' }} |
|
@endforeach
@endforeach
@endif