@php $orderBy = request()->input('order_by'); $orderDir = request()->input('order_dir'); $columns = [ 'id' => [ 'title' => '#', 'width' => 0, ], 'state' => [ 'title' => trans('plugins/ecommerce::shipping.rule.item.tables.state'), ], 'city' => [ 'title' => trans('plugins/ecommerce::shipping.rule.item.tables.city'), ], 'zip_code' => [ 'title' => trans('plugins/ecommerce::shipping.rule.item.tables.zip_code'), ], 'adjustment_price' => [ 'title' => trans('plugins/ecommerce::shipping.rule.item.tables.adjustment_price'), ], 'is_enabled' => [ 'title' => trans('plugins/ecommerce::shipping.rule.item.tables.is_enabled'), ], 'created_at' => [ 'title' => trans('core/base::tables.created_at'), 'width' => '100', ], 'operations' => [ 'title' => trans('core/base::tables.operations'), 'width' => '120', 'class' => 'text-center', 'order' => false, ], ]; $hasOperations = Auth::user()->hasAnyPermission(['ecommerce.shipping-rule-items.edit', 'ecommerce.shipping-rule-items.destroy']); if (!$hasOperations) { Arr::forget($columns, 'operations'); } @endphp @foreach ($columns as $key => $column) @endforeach @if (!empty($total)) @forelse ($items ?? [] as $item) @include('plugins/ecommerce::shipping.items.table-item') @empty @endforelse @endif
{{ Arr::get($column, 'title') }}
{{ trans('plugins/ecommerce::shipping.rule.item.load_data_table', ['total' => $total]) }}

{{ $message ?? trans('core/base::tables.no_data') }}

@if ( !empty($items) && $items instanceof Illuminate\Pagination\LengthAwarePaginator && $items->withQueryString() && ($limit = $items->perPage()))
{!! $items->links('plugins/ecommerce::shipping.items.pagination') !!}
@endif