@csrf
@php
$features = old('features', isset($item) ? $item->features->map(fn($f) => ['title' => $f->title, 'badge_color' => $f->badge_color])->toArray() : []);
$buttons = old('buttons', isset($item) ? (array) ($item->buttons ?? []) : []);
$servicesSelected = old('service_ids', isset($item) ? $item->services->pluck('id')->toArray() : []);
@endphp
دکمهها
@foreach($buttons as $index => $button)
@endforeach
ویژگی ها
@foreach($features as $index => $feature)
@endforeach