@if ($records instanceof \Illuminate\Pagination\LengthAwarePaginator && count($records)) @foreach ($records as $key => $record) @if ($enableMassActions) @php $record_id = $record->{$index}; @endphp @endif @foreach ($columns as $column) @php $columnIndex = explode('.', $column['index']); $columnIndex = end($columnIndex); $supportedClosureKey = ['wrapper', 'closure']; $isClosure = ! empty(array_intersect($supportedClosureKey, array_keys($column))); @endphp @if ($isClosure) {{-- Depereciation Notice: The following key i.e. `wrapper` will remove in the later version. Use only `closure` key to manipulate the column. This will only hit the raw html. --}} @if ( isset($column['wrapper']) && gettype($column['wrapper']) === 'object' && $column['wrapper'] instanceof \Closure ) @if (! empty($column['closure'])) {!! $column['wrapper']($record) !!} @else {{ $column['wrapper']($record) }} @endif @elseif ( isset($column['closure']) && gettype($column['closure']) === 'object' && $column['closure'] instanceof \Closure ) {!! $column['closure']($record) !!} @endif @else @if ($column['type'] == 'price') @if (isset($column['currencyCode'])) {{ core()->formatPrice($record->{$columnIndex}, $column['currencyCode']) }} @else {{ core()->formatBasePrice($record->{$columnIndex}) }} @endif @else {{ $record->{$columnIndex} }} @endif @endif @endforeach @if ($enableActions)
@foreach ($actions as $action) @php $toDisplay = (isset($action['condition']) && gettype($action['condition']) == 'object') ? $action['condition']($record) : true; @endphp @if ($toDisplay) @endif @endforeach
@endif @endforeach @else

{{ $norecords }}

@endif