@props([ 'data' => collect([]), 'columns' => [], 'action' => [ 'show' => true, 'name' => 'Action', 'style' => 'dropdown', 'buttons' => [], ], 'rows' => true, 'sortable' => true, 'exportable' => true, 'searchable' => true, 'columnConfig' => true, 'visibleColumns' => [], ])
@php $filterable = collect($columns)->whereNotNull('filter')->count() > 0; $renderColumns = $columns->whereIn('id', $visibleColumns); @endphp @if ($rows || $sortable || $exportable || $searchable || $filterable)
@endif
@if (@$tbody) {{ $tbody }} @else @forelse ($data as $item) @if ($action['show']) @endif @empty @endforelse @endif
{{ __($emptyMessage) }}
@if (!blank($data) && $data->hasPages()) @endif