@extends('frontEnd.layouts.master') @section('title', $seo->meta_title ?? 'Home') @push('seo') @endpush @section('content') {{-- LEFT SIDEBAR CATEGORY MENU --}} @foreach ($menucategories as $key => $category) {{ $category->name }} @if($category->subcategories && $category->subcategories->count() > 0) @foreach ($category->subcategories as $subcategory) {{ $subcategory->subcategoryName }} @if($subcategory->childcategories && $subcategory->childcategories->count() > 0) @foreach ($subcategory->childcategories as $childcat) {{ $childcat->childcategoryName }} @endforeach @endif @endforeach @endif @endforeach {{-- MAIN SLIDER --}} @foreach ($sliders as $value) @endforeach {{-- BOTTOM SLIDER ADS --}} @foreach ($sliderbottomads as $value) @endforeach {{-- CATEGORY SLIDER SECTION --}} ক্যাটাগরি @foreach ($menucategories as $value) {{ $value->name }} @endforeach {{-- HOT DEALS BANNER --}} @foreach($hitdealsbaner as $hotads) @endforeach {{-- HOT DEAL SECTION --}} হট ডিল @foreach ($hotdeal_top as $key => $value) @if($value->old_price) @php $discount = ((($value->old_price - $value->new_price) * 100) / $value->old_price); @endphp {{ number_format($discount, 0) }}% ছাড় @endif {{ Str::limit($value->name, 35) }} @php $averageRating = $value->reviews->avg('ratting'); $filledStars = floor($averageRating); $hasHalfStar = $averageRating - $filledStars >= 0.5; $emptyStars = 5 - $filledStars - ($hasHalfStar ? 1 : 0); @endphp @if ($averageRating >= 0 && $averageRating <= 5) @for ($i = 0; $i < $filledStars; $i++) @endfor @if ($hasHalfStar) @endif @for ($i = 0; $i < $emptyStars; $i++) @endfor @else Invalid rating range @endif @if($value->old_price) ৳ {{ $value->old_price }} @endif ৳ {{ $value->new_price }} {{-- দুইটা বাটন: অর্ডার + কার্ট --}} @if (!$value->prosizes->isEmpty() || !$value->procolors->isEmpty()) {{-- ভ্যারিয়েন্ট প্রোডাক্ট – দুটোই ডিটেইল পেজে --}} অর্ডার করুন @else {{-- সিম্পল প্রোডাক্ট --}} @csrf অর্ডার করুন @csrf @endif @endforeach {{-- HOMEPAGE ADS --}} @foreach($homepageads as $homeads) @endforeach {{-- CATEGORY WISE HOME PRODUCTS --}} @if($homeproducts && $homeproducts->count() > 0) @foreach ($homeproducts as $homecat) {{ $homecat->name }} আরও দেখুন @foreach ($homecat->products as $key => $value) @if($value->old_price) @php $discount = ((($value->old_price - $value->new_price) * 100) / $value->old_price); @endphp {{ number_format($discount, 0) }}% ছাড় @endif {{ Str::limit($value->name, 35) }} @php $averageRating = $value->reviews->avg('ratting'); $filledStars = floor($averageRating); $hasHalfStar = $averageRating - $filledStars >= 0.5; $emptyStars = 5 - $filledStars - ($hasHalfStar ? 1 : 0); @endphp @if ($averageRating >= 0 && $averageRating <= 5) @for ($i = 0; $i < $filledStars; $i++) @endfor @if ($hasHalfStar) @endif @for ($i = 0; $i < $emptyStars; $i++) @endfor @else Invalid rating range @endif @if($value->old_price) ৳ {{ $value->old_price }} @endif ৳ {{ $value->new_price }} {{-- দুইটা বাটন: অর্ডার + কার্ট --}} @if (!$value->prosizes->isEmpty() || !$value->procolors->isEmpty()) অর্ডার করুন @else @csrf অর্ডার করুন @csrf @endif @endforeach @endforeach @endif {{-- HOMEPAGE ADS 2 --}} @foreach($homepageads2 as $homeads2) @endforeach {{-- CUSTOMER REVIEWS --}} @if($reviews->count() > 0) আমাদের সন্তুষ্ট গ্রাহকদের মতামত @foreach ($reviews as $review) @endforeach @endif {{-- FOOTER TOP ADS --}} @endsection @push('script') @endpush
@php $discount = ((($value->old_price - $value->new_price) * 100) / $value->old_price); @endphp {{ number_format($discount, 0) }}%
@if($value->old_price) ৳ {{ $value->old_price }} @endif ৳ {{ $value->new_price }}