@if(count($allproducts)>0) @foreach($allproducts as $index => $product) agentProduct) style="background: #ffe2e2" @else id="product{{ $product->product_id }}" @endif> @if(!$product->agentProduct) @endif

{{(($allproducts->perPage() * $allproducts->currentPage() - $allproducts->perPage()) + ($index+1) )}}

{{Str::limit($product->title, 40)}} {{ Config::get('siteSetting.currency_symble') . $product->office_rate }} @if($product->agentProduct) {{Config::get('siteSetting.currency_symble') . $product->agentProduct->agent_price}} @else

Price >= {{Config::get('siteSetting.currency_symble') . round($product->office_rate) }} And <= {{ Config::get('siteSetting.currency_symble') . round($product->selling_price)}} @endif {{ Config::get('siteSetting.currency_symble') . ($product->selling_price - $product->office_rate)}} {!!($product->stock > 0) ? $product->stock : 'Stock Out' !!} @php $current_date = \Carbon\Carbon::createFromFormat('Y-m-d H:s:i', date('Y-m-d'. ' 00:00:00')); $end_date = \Carbon\Carbon::createFromFormat('Y-m-d H:s:i', Carbon\Carbon::parse($product->created_at)->addDays($product->day)->format('Y-m-d'. ' 00:00:00')); $diff_in_days = $current_date->diffInDays($end_date); @endphp {{($diff_in_days )}} Days @if($product->agentProduct) Alreay Added @else Add @endif @endforeach {{$allproducts->appends(request()->query())->links()}} @endif