@foreach ($fields as $key => $field)
@php if (isset($data[$field->group][$field->name])) {
$value = old($field->name, $data[$field->group][$field->name]);
}
else {
$value = old($field->name);
}
@endphp
@php $dataTab = null; @endphp
@if (isset($field->tab))
@php $active = ($field->tab == 'posts') ? ' active' : '';
$dataTab = $field->tab; @endphp
@endif
@if (isset($field->dataset))
@php $field->dataset->tab = $dataTab; @endphp
@else
@php $dataset = (object) ['tab' => $dataTab];
$field->dataset = $dataset; @endphp
@endif
@if ($field->name == 'alias_extra_field_1')
{{ __('labels.title.'.$field->group) }}
@endif
@if (!next($fields) || isset($fields[$key + 1]->tab))
@endif
@endforeach