@extends('layouts.app') @section('content')

Product Management

Review and manage submitted products

@if($products->count() > 0)
@foreach($products as $product)
@if($product->thumbnail_url) {{ $product->title }} @else
@endif

{{ $product->title }}

{{ $product->description }}

{{ $product->category->name }} {{ $product->user->name }} {{ $product->created_at->format('M j, Y') }} • {{ $product->created_at->diffForHumans() }}
@if($product->isPending()) Pending @elseif($product->isApproved()) Approved @elseif($product->isRejected()) Rejected @endif
@if($product->isPending() || $product->isRejected())
@csrf
@endif @if($product->isPending() || $product->isApproved())
@csrf
@endif View @can('edit-product', $product) Edit @endcan @can('delete-product', $product)
@csrf @method('DELETE')
@endcan
@endforeach
@if($products->hasPages())
{{ $products->appends(['status' => request('status')])->links() }}
@endif @else

No products found

No products with status: {{ request('status', 'pending') }}

@endif
@endsection