@php $ref = trim((string) ($row->reference_no ?? '')); $link = $row->document_link ?? null; @endphp @if($ref === '') — @elseif(!empty($link['url'])) {{ $ref }} @else {{ $ref }} @endif