@props([ 'headers' => [], 'paginator' => null, 'emptyMessage' => 'No data found.', 'emptyActionText' => null, 'emptyActionUrl' => null, 'wrapperClass' => '', 'tableClass' => '', 'wrapperStyle' => null, 'tableStyle' => null, ]) @php /* Backward compatible behavior: - If paginator is passed: show table only when paginator has rows. - If paginator is NOT passed: always render table and let the parent slot handle @forelse/@empty. */ $hasPaginator = !is_null($paginator); $shouldRenderTable = !$hasPaginator || ($hasPaginator && $paginator->count()); @endphp
{{ $emptyMessage }}
@if ($emptyActionText && $emptyActionUrl) {{ $emptyActionText }} @endif