@php $isEdit = $product->exists; $action = $isEdit ? route('admin.products.update', $product) : route('admin.products.store'); $productColors = $isEdit ? $product->colors->pluck('id')->all() : []; $productMaterials = $isEdit ? $product->materials->pluck('id')->all() : []; @endphp
@push('scripts') @endpush