Product Management

Manage floral designs, inventory items, pricing, and activation states.

Selected: 0
@if(request('search')) Clear @endif
@forelse($products as $product) @empty @endforelse
IMAGE PRODUCT DETAILS PRICE DESCRIPTION CREATED AT STATUS ACTIONS
@if($product->images->isNotEmpty()) Product Image @else Default Product Image @endif
{{ $product->name }} {{ $product->category->name ?? 'N/A' }}
{{ currency_format($product->price) }} {{ Str::limit(strip_tags($product->description), 60) }} {{ $product->created_at->format('M d, Y h:i A') }}
@csrf @method('PATCH') @php $badgeStyleClass = $product->is_active ? 'bg-emerald-50 dark:bg-emerald-950/20 text-emerald-700 dark:text-emerald-400 border border-emerald-200 dark:border-emerald-900/30' : 'bg-zinc-100 dark:bg-zinc-800 text-zinc-500 dark:text-zinc-400 border border-zinc-200 dark:border-zinc-700'; @endphp {{ $product->is_active ? 'Active' : 'Inactive' }}
View @php $productPayload = [ 'id' => $product->id, 'name' => $product->name, 'price' => (float)$product->price, 'category' => (string)$product->category_id, 'description' => $product->description ?? '', 'images' => $product->images->map(fn($img) => [ 'id' => $img->id, 'path' => asset('storage/' . $img->path) ])->toArray() ]; @endphp
@csrf @method('DELETE')
No products found.
@if($products->hasPages())
@include('partials.pagination', ['paginator' => $products])
@endif
@if($errors->any()) @if(old('product_id')) @php $oldProduct = \App\Models\Product::with('images')->find(old('product_id')); @endphp @if($oldProduct) @php $oldProductPayload = [ 'id' => $oldProduct->id, 'name' => old('name', $oldProduct->name), 'price' => (float)old('price', $oldProduct->price ?? 0), 'category' => (string)old('category', $oldProduct->category_id), 'description' => old('description', $oldProduct->description ?? ''), 'images' => $oldProduct->images->map(fn($img) => [ 'id' => $img->id, 'path' => asset('storage/' . $img->path) ])->toArray() ]; @endphp
@endif @else
@endif @elseif(session('open_create_modal'))
@elseif(session('open_edit_modal_id')) @php $editProduct = \App\Models\Product::with('images')->find(session('open_edit_modal_id')); @endphp @if($editProduct) @php $editProductPayload = [ 'id' => $editProduct->id, 'name' => $editProduct->name, 'price' => (float)$editProduct->price, 'category' => (string)$editProduct->category_id, 'description' => $editProduct->description ?? '', 'images' => $editProduct->images->map(fn($img) => [ 'id' => $img->id, 'path' => asset('storage/' . $img->path) ])->toArray() ]; @endphp
@endif @endif @push('scripts') @endpush