@php $dtColumns = collect($columns)->map(function ($c, $index) { return [ 'data' => $c['key'], 'name' => $c['key'], 'orderable' => $c['orderable'] ?? true, 'searchable' => $c['searchable'] ?? true, 'visible' => $c['visible'] ?? true, 'key' => $c['key'], 'label' => $c['label'], ]; })->values(); @endphp
@foreach($columns as $col) @endforeach
{{ $col['label'] }}
Column Visibility

Drag to reorder columns

@foreach($columns as $index => $col) @if((!isset($col['visibility']) || $col['visibility'] !== false) && $col['key'] !== 'checkbox')
@endif @endforeach
@push('custom-scripts') @endpush