@php /** * Reusable empty-state row for data tables. * * Renders a single full-width wrapping the shared .qm-empty * component, so every "no data" table looks identical to the card empty states. * * Usage: * @partial('table-empty', [ * 'colspan' => 6, * 'icon' => 'fa-inbox', * 'msg' => 'No orders yet.', * 'cta' => ['href' => route('vendor.menu'), 'label' => 'Add a dish'], // optional * ]) @endphp * * @var int $colspan Number of columns the row should span (defaults to 1). * @var string $icon Font Awesome icon class, e.g. 'fa-inbox' (defaults to fa-inbox). * @var string $msg Empty-state message (defaults to 'Nothing here yet.'). * @var array $cta Optional ['href' => ..., 'label' => ...] call-to-action button. */ $colspan = isset($colspan) ? max(1, (int) $colspan) : 1; $icon = isset($icon) && $icon !== '' ? (string) $icon : 'fa-inbox'; $msg = isset($msg) && $msg !== '' ? (string) $msg : t_raw('common.nothing_here_yet'); $cta = (isset($cta) && is_array($cta) && !empty($cta['href']) && !empty($cta['label'])) ? $cta : null; ?>

{!! $msg !!}

@if ($cta !== null) {{ $cta['label'] }} @endif