{{--
{{ $title }}
--}}
Show entries
@foreach ($headers as $header) @endforeach @if (count($actions)) @endif @forelse($rows as $index=>$row) {{-- @foreach ($columns as $column) @endforeach --}} {{-- @foreach ($columns as $column) @endforeach --}} @foreach ($columns as $column) @endforeach @if (count($actions)) @endif @empty @endforelse
#{{ $header }}Action
{{ $rows->firstItem() + $index }} @if ($column == 'status') {{ ucfirst($row->$column) }} @else {{ $row->$column }} @endif @if ($column == 'status') @php $status = match ($row->$column) { 1 => ['text' => 'Active', 'color' => 'success'], 0 => ['text' => 'Pending', 'color' => 'warning'], 2 => ['text' => 'Blocked', 'color' => 'danger'], default => ['text' => 'Unknown', 'color' => 'secondary'], }; @endphp {{ $status['text'] }} @else {{ data_get($row, $column) }} @endif @if ($column == 'thumbnail') @if ($row->thumbnail) @else No Image @endif {{-- @elseif ($column == 'status') @php $status = match ($row->$column) { 1 => ['text' => 'Active', 'color' => 'success'], 0 => ['text' => 'Pending', 'color' => 'warning'], 2 => ['text' => 'Blocked', 'color' => 'danger'], default => ['text' => 'Unknown', 'color' => 'secondary'], }; @endphp {{ $status['text'] }} --}} @elseif ($column == 'status') @php $status = match ((int) $row->$column) { 1 => [ 'text' => 'Active', 'color' => 'success', ], 0 => [ 'text' => isset($statusType) && $statusType == 'pending' ? 'Pending' : 'Inactive', 'color' => isset($statusType) && $statusType == 'pending' ? 'warning' : 'danger', ], 2 => [ 'text' => 'Blocked', 'color' => 'danger', ], default => [ 'text' => 'Unknown', 'color' => 'secondary', ], }; @endphp {{ $status['text'] }} @else {{ data_get($row, $column) }} @endif @foreach ($actions as $action => $enabled) @if ($enabled) @switch($action) @case('view') @break @case('edit') @break @case('delete') @break @endswitch @endif @endforeach
No Data Found
Showing {{ $rows->firstItem() ?? 0 }} to {{ $rows->lastItem() ?? 0 }} of {{ $rows->total() }} entries
{{ $rows->links('pagination::bootstrap-5') }}