@extends('layouts.frontend') @section('title', 'Affiliate Products') @section('css') @endsection @section('content')
@include('users.inc.sidebar')
@include('users.affiliates.quicklink')
@csrf
@if(count($allproducts)>0) @foreach($allproducts as $index => $product) agentProduct) style="background: #ffe2e2" @else id="product{{ $product->product_id }}" @endif> @if($product->agentProduct) @else @endif @endforeach @endif
Product Old_Price Set Your Price Commission Quantity Duration Added
@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 }} @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 left Alreay Added Add
{{$allproducts->appends(request()->query())->links()}}
Showing {{ $allproducts->firstItem() }} to {{ $allproducts->lastItem() }} of total {{$allproducts->total()}} entries ({{$allproducts->lastPage()}} Pages)
@endsection @section('js') @endsection