@extends('layouts.app') @section('title', 'My Products') @section('subtitle', 'Manage your product listings') @section('content')

My Products

Manage your product listings and track their approval status

Add New Product
Total Products
{{ $products->total() }}
Pending Approval
{{ $products->where('status', 'pending')->count() }}
Approved
{{ $products->where('status', 'approved')->count() }}
Rejected
{{ $products->where('status', 'rejected')->count() }}

Product Listings

@if($products->count() > 0)
@foreach($products as $product) @endforeach
Product Category Price Stock Status Date Actions
{{ $product->name }}
{{ Str::limit($product->name, 30) }}
{{ Str::limit($product->description, 40) }}
{{ $product->category }} ${{ number_format($product->price, 2) }} {{ $product->quantity }} {{ ucfirst($product->status) }} @if($product->isRejected() && $product->rejection_reason)
{{ Str::limit($product->rejection_reason, 30) }}
@endif
{{ $product->created_at->format('M j, Y') }}
View Edit @if($product->isDraft())
@csrf
@endif
@csrf @method('DELETE')
{{ $products->links() }}
@else

No products

Get started by creating your first product.

@endif
@endsection