@foreach($definitions as $def)
@php
$val = old('custom_fields.'.$def->id, $customer->getCustomFieldValue($def->field_key));
@endphp
@if($def->field_type === 'select')
@elseif($def->field_type === 'multiselect')
@php
$selectedArr = is_array($val) ? $val : (json_decode($val, true) ?? []);
@endphp
@elseif($def->field_type === 'boolean')
@elseif($def->field_type === 'textarea')
@elseif($def->field_type === 'date')
@elseif($def->field_type === 'number' || $def->field_type === 'decimal')
@else
@endif
@error('custom_fields.'.$def->id)
Bu alan zorunludur.
@enderror