@extends('admin.layouts.app') @section('title', $product->exists ? 'Edit Product' : 'Add Product') @push('styles') @endpush @section('content')
@csrf @if($product->exists) @method('PUT') @endif
{{-- LEFT COLUMN --}}
{{-- Basic info --}}
Basic information
@error('name')
{{ $message }}
@enderror
@error('sku')
{{ $message }}
@enderror
{{-- Pricing --}}
Pricing & stock
@error('price')
{{ $message }}
@enderror
@if($product->exists && $product->discount_percent > 0) {{ $product->discount_percent }}% off @else — @endif
{{-- Tabs: Description / Specs / SEO --}}
Description
Specs
SEO
{{-- Description tab --}}
Max 500 characters. Shown on listing cards.
{!! old('description', $product->description) !!}
{{-- Specs tab --}}
Pipe-separated values. Shown as chips on product cards (e.g. i5 8th Gen | 8GB | 256GB SSD).
Detailed spec table
Group → Label → Value. Group is optional (e.g. "Processor", "Display", "Storage").
@php $specs = $product->specs_rows ?? collect(); @endphp @foreach($specs as $i => $spec)
@endforeach
{{-- SEO tab --}}
Max 60 characters recommended.
{{-- RIGHT COLUMN --}}
{{-- Publish --}}
Publish
{{-- Images --}}
Images
Drag to reorder · First = primary
@if($product->exists)
@foreach($product->getMedia('images') as $i => $media)
Image {{ $i+1 }} @if($i === 0)
PRIMARY
@endif
@endforeach
JPG, PNG, WebP · Max 4MB each · First uploaded = primary
@else
Add images after saving the product for drag-to-reorder.
@endif
@endsection @push('scripts') @endpush