@php $isEdit = isset($product); $disk = config('upload.disk'); $visibleBadges = ['new', 'trending', 'best_seller', 'premium', 'limited_edition', 'chefs_choice']; $existingVariantsForJs = $isEdit ? $product->variants->map(fn ($v) => [ 'key' => 'v'.$v->id, 'variant_type' => $v->variant_type, 'unit' => $v->unit, 'label' => $v->label, 'mrp' => (string) $v->mrp, 'cost_price' => $v->cost_price !== null ? (string) $v->cost_price : '', 'discount_type' => $v->discount_type, 'discount_value' => $v->discount_value !== null ? (string) $v->discount_value : '', 'is_default' => $v->is_default, 'is_active' => $v->is_active, ])->values() : collect(); @endphp
Created by {{ $product->creator?->name ?? '—' }} on {{ $product->created_at?->format('d M Y, h:i A') }} · Last updated by {{ $product->updater?->name ?? '—' }} on {{ $product->updated_at?->format('d M Y, h:i A') }}
@endif| Default | Weight | Unit | Label | MRP * | Cost Price (admin only) | Discount Type | Discount Value | Selling Price | Status |
|---|