@props([ 'link' => '#', // SVG o HTML del ícono 'filters' => [], 'showCreate' => true, ])
@if($showCreate) @endif
@foreach ($columns as $column) @endforeach @if(isset($actionsSlot)) @endif @foreach ($rows as $row) @php // Generamos un string con todos los valores de la fila para Alpine $rowText = collect($columns)->map(fn($col) => data_get($row, $col['field']))->implode(' '); @endphp @foreach ($columns as $column) @endforeach @if(isset($actionsSlot)) @endif @endforeach @if($rows->isEmpty()) @endif
{{ $column['label'] }} Acciones
@if(isset($column['render']) && is_callable($column['render'])) {!! $column['render']($row) !!} @else {{ data_get($row, $column['field']) }} @endif {{ $actionsSlot($row) }}
No hay registros.
{{ $rows->links('vendor.pagination.tailwind') }}