@extends('frontend.dashboard_master') @section('main') @section('title') Home @endsection @include('frontend.home.home_slider') @include('frontend.home.home_features_category') @include('frontend.home.home_banner') @include('frontend.home.home_new_product') @include('frontend.home.home_features_product') @foreach ($categories as $category)

{{$category->category_name}}

@php $products = App\Models\Product::where('status',1)->where('category_id',$category->id)->orderBy('id','DESC')->limit(5)->get(); @endphp @forelse($products as $product) @php // persntage $discount = ($product->discount_price/$product->selling_price) * 100; @endphp
@if ($product->discount_price == NULL) New @else {{round($discount)}}% @endif

{{$product->product_name}}

@if ($product->vendor_id == NULL) By Admin @else By {{$product->vendor->name}} @endif
@php // persntage $amountAfterDiscount = $product->selling_price - $product->discount_price; @endphp @if ($product->discount_price == NULL)
${{$product->selling_price}}
@else
${{$amountAfterDiscount}} ${{$product->selling_price}}
@endif {{-- --}}
@empty

No Product Added

@endforelse {{-- --}}
@endforeach {{--

Tshirt Category

--}} {{--

Computer Category

--}}

Hot Deals

@foreach($hot_deals as $item)
{{ $item->product_name }}
{{--
(4.0)
--}} @if($item->discount_price == NULL)
${{ $item->selling_price }}
@else
${{ $item->selling_price - $item->discount_price }} ${{ $item->selling_price }}
@endif
@endforeach

Special Offer

@foreach($special_offer as $item)
{{ $item->product_name }}
{{--
(4.0)
--}} @if($item->discount_price == NULL)
${{ $item->selling_price }}
@else
${{ $item->selling_price - $item->discount_price }} ${{ $item->selling_price }}
@endif
@endforeach

Recently added

@foreach($new as $item)
{{ $item->product_name }}
@if($item->discount_price == NULL)
${{ $item->selling_price }}
@else
${{ $item->selling_price - $item->discount_price }} ${{ $item->selling_price }}
@endif
@endforeach

Special Deals

@foreach($special_deals as $item)
{{ $item->product_name }}
@if($item->discount_price == NULL)
${{ $item->selling_price }}
@else
${{$item->selling_price - $item->discount_price }} ${{ $item->selling_price }}
@endif
@endforeach
@include('frontend.home.home_vendor_list') @endsection