{{-- Object input: Sol liste alan adları + sağda seçilen alanın input'u --}} @php $safePath = preg_replace('/[^A-Za-z0-9_-]+/', '_', $path); $fields = is_array($groupFields ?? null) ? $groupFields : (is_array($inputType ?? null) ? $inputType : []); $keys = array_keys($fields); $activeField = method_exists($this, 'getActiveField') ? ($this->getActiveField($path) ?: ($keys[0] ?? null)) : ($keys[0] ?? null); $title = ucfirst(str_replace('_',' ', $groupName ?? $inputName ?? $path)); @endphp

{{ $title }}

    @foreach($fields as $fieldName => $fieldType) @php $label = ucwords(str_replace('_',' ',$fieldName)); $isActive = ($fieldName === $activeField); @endphp
  • @endforeach
@if(!$activeField)
Bir alan seçiniz.
@else @php $inp = $fields[$activeField] ?? 'string'; $currentPath = $path . '.' . $activeField; $fieldId = str_replace('.', '_', $currentPath); $wireModel = 'data.' . $currentPath; @endphp
{{ ucwords(str_replace('_',' ',$activeField)) }}
@switch($inp) @case('text')
{!! data_get($data, $currentPath, '') !!}
@break @case('string')
@break @case('textarea')
@break @case('number')
@break @case('boolean')
@break @case('select')
@break @case('file')
@if(data_get($data, $currentPath))
@php $isPinImage = ($activeField === 'urun_tanitimi_orta_alan_pinli_gorsel'); $pinsPath = $path . '.urun_tanitimi_orta_alan_pinler'; $pinsRaw = data_get($data, $pinsPath, []); if (!is_array($pinsRaw)) { $pinsRaw = []; } $pins = array_values(array_filter($pinsRaw, function ($v, $k) { return is_int($k) && is_array($v); }, ARRAY_FILTER_USE_BOTH)); $imgId = $fieldId . '_pinimg'; @endphp @if($isPinImage)
preview @foreach($pins as $pi => $pin) @php $px = is_numeric($pin['x'] ?? null) ? (float)$pin['x'] : 0; $py = is_numeric($pin['y'] ?? null) ? (float)$pin['y'] : 0; $puid = $pin['__uid'] ?? ($imgId . '_' . $pi); $activePinIdx = method_exists($this, 'getActivePinIndex') ? $this->getActivePinIndex($pinsPath) : null; $isSelectedPin = ($activePinIdx !== null && (int)$activePinIdx === (int)$pi); @endphp @endforeach
Pinler
Görsel üzerine tıklayarak pin ekleyin.
Pinlerin yerini değiştirmek için pin üzerine tıklayıp maviye dönüştükten sonra taşıyabilirsiniz.
@if(empty($pins))
Henüz pin yok.
@else
@foreach($pins as $pi => $pin) @php $puid = $pin['__uid'] ?? ($imgId . '_' . $pi); $pinModel = 'data.' . $pinsPath . '.' . $pi; $pinImageId = $imgId . '_pin_' . $pi . '_image'; $pinImagePath = $pinsPath . '.' . $pi . '.image'; @endphp
#{{ $pi + 1 }} Pin içeriği
@endforeach
@endif
@else preview @endif
@endif
@break @default
@endswitch
@endif