@extends('layouts.admin') @section('title', isset($product) ? 'Edit Product' : 'Add Product') @section('page_title', isset($product) ? 'Edit Product' : 'Add New Product') @section('content')
{{ isset($product) ? 'Edit Product Information' : 'Product Details' }}
@csrf @if(isset($product)) @method('PUT') @endif
@error('name')
{{ $message }}
@enderror
@error('slug')
{{ $message }}
@enderror
@error('description')
{{ $message }}
@enderror
{{ \App\Support\Currency::symbol() }}
@error('price')
{{ $message }}
@enderror
{{ \App\Support\Currency::symbol() }}
Original price before discount. Leave blank if no discount. @error('compare_at_price')
{{ $message }}
@enderror
{{ \App\Support\Currency::symbol() }}
@error('cost_price')
{{ $message }}
@enderror
@error('sku')
{{ $message }}
@enderror
@error('product_code')
{{ $message }}
@enderror
@error('category_id')
{{ $message }}
@enderror
@error('brand_id')
{{ $message }}
@enderror
Allowed formats: JPG, PNG, GIF, WebP. Max size: 2MB @error('image')
{{ $message }}
@enderror @if(isset($product) && $product->image)
{{ $product->name }} Current image (upload a new one to replace)
@endif
Upload multiple images for product gallery. Allowed formats: JPG, PNG, GIF, WebP. Max size: 2MB each @error('images.*')
{{ $message }}
@enderror
@if(isset($product) && $product->productImages->count() > 0)
@foreach($product->productImages as $image)
Product Image
@if($image->is_primary) Primary @else @csrf @endif
@csrf @method('DELETE')
@endforeach
@endif
is_active : 1) == 1 ? 'checked' : '' }}>
is_featured : 0) == 1 ? 'checked' : '' }}>
Cancel
Quick Info
@if(isset($product))
Product ID

#{{ $product->id }}

Created

{{ $product->created_at->format('M d, Y') }}

Last Updated

{{ $product->updated_at->format('M d, Y H:i') }}

@else

Fill in the form to create a new product

@endif
@endsection