@extends('layouts.frontend') @section('title', $offerType->title) @section('metatag') @endsection @section('css') @endsection @section('content')
slider image
@if($offerType && count($offerType->offers)>0)
@foreach($offerType->offers as $offer) @php $offer_products = App\Models\Product::join('offer_products', 'products.id', 'offer_products.product_id') ->where('offer_id', $offer->id) ->selectRaw('offer_discount as discount, offer_products.discount_type,fake_sale,offer_quantity, offer_id, products.id,title,slug,selling_price,stock,feature_image,product_type') ->where('offer_products.status', 'active'); if($offer->offer_type == 'jowar-bhata'){ $offer_products = $offer_products->take(6)->inRandomOrder()->get(); }else{ $offer_products = $offer_products->orderBy('offer_products.position', 'asc')->take(6)->get(); } @endphp @if(count($offer_products)>0)

{{$offer->title}} @if(now() <= $offer->start_date) Upcomming @elseif(now() >= $offer->start_date && now() <= $offer->end_date) Live @else @endif

@if(now() <= $offer->start_date)
00

Days

00

HOURS

00

MINUTES

00

SECONDS

@elseif(now() >= $offer->start_date && now() <= $offer->end_date)
00

Days

00

HOURS

00

MINUTES

00

SECONDS

@else @if($offer->offer_type == 'quiz') Quiz @else Offer @endif Closed @endif
@foreach($offer_products as $index => $product) @if($offer->offer_type == 'kanamachi')

{{Str::limit($product->title, 40)}}