@extends('layouts.front.home') @section('title') {{ trans_or_fallback('', '') }} - Vendor | Hema @endsection @section('css') @endsection @section('content')
@include('flash::message') @if ($errors->any())
{{ app()->getLocale() == 'ar' ? 'خطأ في التحقق:' : 'Validation Error:' }}
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif

{{ app()->getLocale() == 'ar' ? 'تعديل المنتج' : 'Edit Product' }}

@csrf @method('PUT') {{-- Product Name --}}
@error('name')
{{ $message }}
@enderror
{{-- Category --}}
@error('category_id')
{{ $message }}
@enderror
{{-- Description --}}
@error('description')
{{ $message }}
@enderror
{{-- Price + Qty --}}
SAR
@error('price')
{{ $message }}
@enderror
@error('quantity')
{{ $message }}
@enderror
{{-- Upload Images --}}
{{ app()->getLocale() == 'ar' ? 'رفع صور المنتج (JPG / PNG) - حد أقصى 5 صور' : 'Upload product images (JPG / PNG) - up to 5 images' }}
@error('images')
{{ $message }}
@enderror
{{-- Existing Images --}} @php $existingImages = is_array($product->imgs) ? $product->imgs : []; if (!empty($product->img)) { $existingImages = array_values(array_filter($existingImages, fn($p) => (string) $p !== (string) $product->img)); array_unshift($existingImages, $product->img); } $placeholderImage = asset('front/assets/images/emptyproducts.png'); @endphp @if(count($existingImages) > 0)
@endif {{-- Specifications --}}
{{ app()->getLocale() == 'ar' ? 'المواصفات' : 'Specifications' }}
guarantee_file ? '' : 'required' }}>
@if(!empty($product->product_pdf)) View current PDF @endif
{{ app()->getLocale() == 'ar' ? 'إلغاء' : 'Cancel' }}
@endsection @section('script') @endsection