@props(['id', 'columns', 'ajax']) @php $dtColumns = collect($columns)->map(function ($c) { return [ 'data' => $c['key'], 'name' => $c['key'], 'orderable' => $c['orderable'] ?? true, 'searchable' => $c['searchable'] ?? true, 'className' => $c['className'] ?? '', ]; })->values(); @endphp
@foreach($columns as $col) @endforeach @foreach($columns as $col) @endforeach {{-- DataTables will populate this --}}
{{ $col['label'] }}
@if(($col['searchable'] ?? true))
@endif
@push('custom-scripts') @endpush