@if(count($allproducts)>0) @foreach($allproducts as $product) @php $products_id = $offer->offer_products->pluck('product_id')->toArray(); $discount = ($product->discount) ? $product->discount : 5; @endphp id, $products_id)) style="background: #ffe2e2" @endif> {{Str::limit($product->title, 40)}} {{ Config::get('siteSetting.currency_symble') . $product->selling_price }} @if($offer->discount > 0) @if($offer->discount_type == 'fixed') {{ Config::get('siteSetting.currency_symble') . $offer->discount }} @elseif($offer->discount_type == '%') {{ Config::get('siteSetting.currency_symble') . ($product->selling_price * $offer->discount) / 100 }} @elseif($offer->discount_type == 'cash-back') @if($offer->discount_type == '%') {{ Config::get('siteSetting.currency_symble') . ($product->selling_price * $offer->discount) / 100 }} @else {{ Config::get('siteSetting.currency_symble') . ($product->selling_price - $offer->discount) }} @endif @else {{ Config::get('siteSetting.currency_symble') .( $product->selling_price - $offer->discount) }} @endif @else @if($offer->offer_type == 'jowar-bhata') @else @endif @endif @if($offer->offer_type == 'jowar-bhata') @endif @if($offer->offer_type != 'jowar-bhata') @if(!$offer->discount_type) @else {{$offer->discount_type}} discount @endif @endif @if($offer->offer_type != 'hadudu') @else @endif @if($offer->offer_type != 'jowar-bhata') @endif @if(in_array($product->id, $products_id)) Added @else Add @endif @endforeach {{$allproducts->appends(request()->query())->links()}} @endif