added setting new form type..

This commit is contained in:
Cüneyt Şentürk 2026-01-22 02:41:09 +00:00
parent 4829c7728d
commit 24f0dbb961
1 changed files with 15 additions and 1 deletions

View File

@ -95,13 +95,27 @@
without-add-new
/>
@break
@case('toggle')
@case('toggleGroup')
@php $value = setting($module->getAlias() . '.' . $field['name'], $field['value'] ?? null); @endphp
<x-form.group.toggle
name="{{ $field['name'] }}"
label="{{ trans($field['title']) }}"
enable="{{ $field['enable'] ? trans($field['enable']) : '' }}"
disable="{{ $field['disable'] ? trans($field['disable']) : '' }}"
:value="$value"
:dynamic-attributes="$field['attributes']"
/>
@break
@default
@php
$type = str_replace('Group', '', $type);
$componentName = 'form.group.' . $type;
$value = setting($module->getAlias() . '.' . $field['name'], $field['value'] ?? null);
@endphp
<x-dynamic-component :component="$componentName" name="{{ $field['name'] }}" label="{{ trans($field['title']) }}" :dynamic-attributes="$field['attributes']" />
<x-dynamic-component :component="$componentName" name="{{ $field['name'] }}" label="{{ trans($field['title']) }}" :value="$value" :dynamic-attributes="$field['attributes']" />
@endswitch
@endforeach