@extends('frontend.layouts.app') @section('content')
@if (get_setting('home_banner1_images') != null)
@php $banner_1_imags = json_decode(get_setting('home_banner1_images')); $data_md = count($banner_1_imags) >= 2 ? 2 : 1; @endphp
@endif @php $num_todays_deal = count($todays_deal_products); @endphp
@if (get_setting('home_slider_images') != null) @endif
@php $flash_deal = \App\Models\FlashDeal::where('status', 1)->where('featured', 1)->first(); @endphp @if($flash_deal != null && strtotime(date('Y-m-d H:i:s')) >= $flash_deal->start_date && strtotime(date('Y-m-d H:i:s')) <= $flash_deal->end_date)
@php $flash_deals = $flash_deal->flash_deal_products->take(10); @endphp
@endif @if($num_todays_deal > 0)
@if (get_setting('todays_deal_banner') != null || get_setting('todays_deal_banner_small') != null)
{{ env('APP_NAME') }} promo
{{ env('APP_NAME') }} promo
@endif
@endif @if (count($featured_categories) > 0)

{{ translate('Featured Categories') }}

@foreach ($featured_categories as $key => $category)
{{ $category->getTranslation('name') }}
{{ $category->getTranslation('name') }}
@endforeach
@endif @if (get_setting('home_banner2_images') != null)
@php $banner_2_imags = json_decode(get_setting('home_banner2_images')); $data_md = count($banner_2_imags) >= 2 ? 2 : 1; @endphp
@endif
@if (count($newest_products) > 0)

{{ translate('New Products') }}

@endif
@if (get_setting('home_banner3_images') != null)
@php $banner_3_imags = json_decode(get_setting('home_banner3_images')); $data_md = count($banner_3_imags) >= 2 ? 2 : 1; @endphp
@endif @if(addon_is_activated('auction'))
@endif @if(get_setting('coupon_system') == 1)
{{ translate(get_setting('cupon_title')) }}
{{ translate(get_setting('cupon_subtitle')) }}
@endif
@if(get_setting('classified_product') == 1) @php $classified_products = \App\Models\CustomerProduct::where('status', '1')->where('published', '1')->take(6)->get(); @endphp @if (count($classified_products) > 0)

{{ translate('Classified Ads') }}

@if (get_setting('classified_banner_image') != null || get_setting('classified_banner_image_small') != null)
{{ env('APP_NAME') }} promo
{{ env('APP_NAME') }} promo
@endif
@foreach ($classified_products as $key => $classified_product)

{{ $classified_product->getTranslation('name') }}

{{ $classified_product->user ? $classified_product->user->name : '' }}
{{ single_price($classified_product->unit_price) }}
@if($classified_product->conditon == 'new') {{translate('New')}} @elseif($classified_product->conditon == 'used') {{translate('Used')}} @endif
@endforeach
@endif @endif @php $best_selers = Cache::remember('best_selers', 86400, function () { return \App\Models\Shop::where('verification_status', 1)->orderBy('num_of_sale', 'desc')->take(5)->get(); }); @endphp @if (get_setting('vendor_system_activation') == 1)

{{ translate('Top Sellers') }}

@endif @if (get_setting('top_brands') != null)

{{ translate('Top Brands') }}

@php $top_brands = json_decode(get_setting('top_brands')); @endphp @foreach ($top_brands as $value) @php $brand = \App\Models\Brand::find($value); @endphp @if ($brand != null) @endif @endforeach
@endif @endsection @section('script') @endsection