@extends('layouts.admin-master') @section('title', 'Product list') @section('css-top') @endsection @section('css') @endsection @section('content')

Total Product ({{$all_products}})

@if(count($products)>0) @foreach($products as $index => $product) @endforeach @else @endif
# Product Seller Sales Regular_Price Discount_Price Stock Upload_By Approved Status Actions
{{(($products->perPage() * $products->currentPage() - $products->perPage()) + ($index+1) )}} Image {{Str::limit($product->title, 40)}} @if($product->vendor) {{$product->vendor->shop_name}}@else Seller not found. @endif
{{Carbon\Carbon::parse($product->created_at)->format(Config::get('siteSetting.date_format'))}}
{{ $product->sales }} {{Config::get('siteSetting.currency_symble')}}{{$product->selling_price}} @php if($product->discount > 0){ if ($product->discount_type == '%') { $discount_price = $product->selling_price - ($product->discount * $product->selling_price) / 100; } else { $selling_price = $product->selling_price; $discount_price = $product->selling_price - $product->discount; } } @endphp @if($product->discount) {{Config::get('siteSetting.currency_symble') . $discount_price}} @else N/A @endif {!!($product->stock > 0) ? $product->stock : 'Stock Out' !!}

{{ ($product->user) ? $product->user->name : 'seller' }} @if($product->updated_by)
{{ ($product->updatedBy) ? $product->updatedBy->name : 'seller' }} @endif

status != 'pending') ? 'checked' : ''}} data-on-color="success" data-off-color="danger" data-on-text="Approved" data-off-text="Pending">
@if($product->status != 'pending')
status == 1 || $product->status == 'active') ? 'checked' : ''}} type="checkbox" class="custom-control-input" id="status{{$product->id}}">
@else Pending @endif
No Products Found.
{{$products->appends(request()->query())->links()}}
Showing {{ $products->firstItem() }} to {{ $products->lastItem() }} of total {{$products->total()}} entries ({{$products->lastPage()}} Pages)
@include('admin.modal.delete-modal') @endsection @section('js') @endsection