@extends('layouts.backend') @section('content')

Ready Loads

#
Reference
LRN
Type of Entry
GMR
Status
@foreach ($loads as $no => $load)
{{ $load->customer_reference }}
{{ $load->lrn }}
{{ optional($load->getTypeOfEntry)->type ?? '—' }}
{{ $load->gmr == '0' ? 'No' : 'Yes' }}
@if ($load->status=='3') In progress @else {{ optional($load->getStatus)->status ?? '—' }} @endif
@php // Null-safety: a stale FK (deleted uploader / // customer) previously 500'd the page inside // the @@foreach with "Property name on null". $uName = optional($load->getUser)->name ?? 'Unknown'; $cId = optional($load->getCustomer)->id; $cName = optional($load->getCustomer)->legal_name ?? 'Unknown customer'; @endphp
by: {{ $uName }} (Company: @if($cId) {{ $cName }} @else {{ $cName }} @endif ) on {{date('d M Y H:i',strtotime($load->created_at))}}
@endforeach
@endsection