@extends('layouts.admin') @section('content')

Edit Product

@csrf @method('PUT')
railing_type) checked @endif>
@foreach($product->variations as $index => $variation)
@foreach($colors as $colorIndex => $color) @php $option = $variation->options->where('color_id', $color->id)->first(); // Use color ID as the key for existing variations $colorKey = $option ? $option->id : 'color-' . $color->id . '-' . $index; @endphp
{{ $color->name }} @if($option) @endif
@endforeach

Kg

cm

cm

cm

L

Kg

@endforeach
@if($product->variations->isNotEmpty()) @endif

Kg

mm

mm

mm

L

Kg

@foreach($product->otherInfo as $infoIndex => $info)
Delete @if($info->image_path)
@endif
@endforeach
Delete
@foreach($product->models as $modelIndex => $model)
Delete
@endforeach
@foreach($product->images->where('type', 'gallery') as $image)
@endforeach

Supports JPG, PNG, and WEBP formats

@if($mainImage = $product->images->where('type', 'main')->first())
@endif

Supports JPG, PNG, and WEBP formats

@if($infoImage = $product->images->where('type', 'info')->first())
@endif

Supports JPG, PNG, and WEBP formats

@if($homeImage = $product->images->where('type', 'home')->first())
@endif

Supports JPG, PNG, and WEBP formats

Cancel
@endsection