{{-- enumerate the values in an array --}} @php $column['value'] = $column['value'] ?? data_get($entry, $column['name']); $column['escaped'] = $column['escaped'] ?? true; $column['prefix'] = $column['prefix'] ?? ''; $column['suffix'] = $column['suffix'] ?? ''; if($column['value'] instanceof \Closure) { $column['value'] = $column['value']($entry); } // the value should be an array whether or not attribute casting is used if (!is_array($column['value'])) { $column['value'] = json_decode($column['value'], true); } @endphp @if($column['value'] && count($column['value'])) {{ $column['prefix'] }} @foreach($column['value'] as $key => $text) @php $column['text'] = $text; $related_key = $key; @endphp @includeWhen(!empty($column['wrapper']), 'crud::columns.inc.wrapper_start') @if($column['escaped']) {{ $column['text'] }} @else {!! $column['text'] !!} @endif @includeWhen(!empty($column['wrapper']), 'crud::columns.inc.wrapper_end') @if(!$loop->last), @endif @endforeach {{ $column['suffix'] }} @else {{ $column['default'] ?? '-' }} @endif