Reports create page get dynamic field and save.

This commit is contained in:
Cüneyt Şentürk
2020-01-18 19:24:29 +03:00
parent 336e581ab7
commit 7efc4cf7b9
22 changed files with 192 additions and 128 deletions

View File

@ -2,14 +2,30 @@
@php $type = $field['type']; @endphp
@if (($type == 'textGroup') || ($type == 'emailGroup') || ($type == 'passwordGroup'))
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['icon'], $field['attributes']) }}
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['icon'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'textareaGroup')
{{ Form::$type('settings[' . $field['name'] . ']', $field['title']) }}
@elseif ($type == 'selectGroup')
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['icon'], $field['values'], $field['selected'], $field['attributes']) }}
{{ Form::$type($field['name'], $field['title'], $field['icon'], $field['values'], $field['selected'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'radioGroup')
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], 1, $field['enable'], $field['disable'], $field['attributes']) }}
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], 1, $field['enable'], $field['disable'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@elseif ($type == 'checkboxGroup')
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['items'], $field['value'], $field['id'], $field['attributes']) }}
{{ Form::$type('settings[' . $field['name'] . ']', $field['title'], $field['items'], $field['value'], $field['id'], array_merge([
'data-field' => 'settings'
],
$field['attributes'])
) }}
@endif
@endforeach