@foreach($loans as $loan) @endforeach
Requested Issued Principal Outstanding Installment Status Reason
{{ $loan->requested_at?->format('Y-m-d') ?? '—' }} {{ $loan->issued_at?->format('Y-m-d') ?? '—' }} {{ number_format((float) $loan->principal, 2) }} {{ number_format((float) $loan->outstanding, 2) }} @if($loan->monthly_installment) {{ number_format((float) $loan->monthly_installment, 2) }} @if($loan->loan_period_months) / {{ $loan->loan_period_months }} mo @endif @else — @endif @if(in_array($loan->status, ['active', 'approved'], true)) {{ ucfirst($loan->status) }} @elseif($loan->status === 'pending') Pending @elseif(in_array($loan->status, ['rejected', 'cancelled'], true)) {{ ucfirst($loan->status) }} @else {{ ucfirst($loan->status ?? '—') }} @endif {{ $loan->reason ? \Illuminate\Support\Str::limit($loan->reason, 120) : '—' }}