2020-07-23 08:57:23 +03:00

38 lines
1.5 KiB
PHP

@foreach($fields as $field)
@php $type = $field['type']; @endphp
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
{{ Form::$type($field['name'], $field['title'], $field['icon'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'textareaGroup')
{{ Form::$type($field['name'], $field['title']) }}
@elseif ($type == 'dateGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], array_merge([
'model' => 'form.settings'.'.'.$field['name']
],
$field['attributes'])
) }}
@elseif ($type == 'selectGroup')
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $field['selected'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'radioGroup')
{{ Form::$type($field['name'], $field['title'], $field['selected'] ?? true, $field['enable'], $field['disable'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'checkboxGroup')
{{ Form::$type($field['name'], $field['title'], $field['items'], $field['value'], $field['id'], $field['selected'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@endif
@endforeach