@php
use Illuminate\Support\Str;
$labels = [
'ID',
'Name',
'Email',
'Department Name',
'Orcid Id',
'Scopus Id',
'Mobile No',
'Extension',
'Role Name',
'Actions',
];
$columns = [];
foreach ($labels as $i => $label) {
$columns[] = [
'label' => $label,
'id' => 'column-' . Str::slug($label, '-'),
'value' => $i, // 0-based index
'checked' => true,
];
}
@endphp