{{ auth()->user()->hasRole('admin') ? 'Product Management' : 'Product Page' }} {{ auth()->user()->hasRole('admin') ? 'This product list is created for sales. Admin can manage the products by updating the status.' : 'You can view the selling products list on this page.' }} @if(auth()->user()->hasRole('admin'))
Add Product
@endif
{{--

Categories

--}}

Categories

Product Lists

@foreach ($products->filter(function ($product) {return auth()->user()->hasRole('admin') || $product->product_quantity > 0;}) as $i => $product) {{ $loop->iteration }}. {{ $product->product_name }} {{ $product->product_serial_number }} {{ $product->product_selling_price }} {{ $product->product_purchase_price }} @if(auth()->user()->hasRole('admin')) {{ $product->product_quantity }} {{ $product->product_status }} @else {{ $product->product_quantity }} {{ $product->product_status }} @endif @if($product->product_image) @else No Image @endif @if(auth()->user()->hasRole('admin')) @endif @endforeach