@extends('admin.layout.template') @section('title','Edit Product') @php $locations=App\Models\Location::all(); @endphp @section('content')
Product Details
@csrf
{{-- Product Name --}}
{{-- Material --}} {{-- Pattern --}} {{-- Features --}}
{{-- Warranty --}}
{{-- Maintenance --}}
{{-- Rooms (Multiple) --}}
{{-- Tags (Multiple) --}}
{{-- Measurement --}} @php // Split measurement string safely $measurements = $product->measurement ? array_map('trim', explode('x', $product->measurement)) : []; $length = $measurements[0] ?? ''; $width = $measurements[1] ?? ''; $height = $measurements[2] ?? ''; @endphp
Example: 120 x 60 x 45 cm
{{-- Description --}}
@php $variant = $product->variants->first(); @endphp
@csrf {{-- Product & Variant --}}
Variant / SKU Details
@php $variant = $product->variants->first(); @endphp
@csrf
Product Images
{{-- EXISTING IMAGES --}} @if($variant && $variant->images->count()) @foreach($variant->images as $img)
@endforeach @else

No images uploaded

@endif
@php $variant = $product->variants->first(); $existingStocks = $variant ? $variant->stocks : collect(); @endphp
@csrf
Stock Management
@forelse($existingStocks as $index => $stock)
{{-- stock id (for update) --}} {{-- Location --}}
{{-- Available Qty --}}
{{-- Opening Qty --}}
{{-- Received Qty --}}
{{-- Damaged Qty --}}
{{-- Returned Qty --}}
{{-- Remove --}}
@empty {{-- If no stock exists yet --}}
No stock records found. Please add stock.
@endforelse
@endsection