{{-- PDF export of a list or report (CrudController / ReportController ?export=pdf) — same look as the Word export (DocxTable). --}} @php $isNum = fn ($v) => is_int($v) || is_float($v) || (is_string($v) && $v !== '' && is_numeric(str_replace(',', '', $v))); $text = fn ($v) => \App\Support\Exports\DocxTable::text($v); $filterText = collect($filters ?? [])->map(fn ($v, $k) => \Illuminate\Support\Str::headline((string) $k).': '.(is_array($v) ? implode(', ', $v) : $v))->implode(' · '); $wide = count($headings) > 8; @endphp
{{ count($rows) }} row(s) · exported from {{ config('app.name') }} on {{ now()->format('m/d/Y g:i A') }}

{{ $title }}

@if($company?->name){{ $company->name }}
@endif @if($filterText)Filters: {{ $filterText }}
@endif Exported {{ now()->format('m/d/Y g:i A') }}
@foreach($headings as $h)@endforeach @foreach($rows as $row) @foreach($row as $cell)@endforeach @endforeach
{{ $h }}
$isNum($cell)])>{{ $text($cell) }}
@if(!count($rows))
No records match these filters.
@endif