@extends('themes.gadget.layouts.master') @section('title', ($setting->name ?? 'Gadget Monkey BD') . ' | Smartphones, Gadgets & Premium Accessories') @section('content') @php $hp = $hp ?? ($homepageSettings ?? []); $useBuilder = \App\Services\HomepageSettingsService::usesPageBuilder(); $sliderMs = max(2000, min(15000, (int) ($hp['slider_interval'] ?? 4500))); $mediaUrl = function ($path) { if (!$path) return null; if (str_starts_with($path, 'http://') || str_starts_with($path, 'https://')) return $path; return asset($path); }; $topSelling = ($popularProducts ?? collect())->isNotEmpty() ? $popularProducts : ($trendingProducts ?? collect()); $featuredItems = ($bestSellers ?? collect())->isNotEmpty() ? $bestSellers : ($featuredProducts ?? collect()); $brandIds = \App\Models\Product::where('status', 1) ->where(fn ($q) => \App\Services\ThemeCatalogService::scopeProducts($q, 'gadget')) ->whereNotNull('brand_id') ->distinct() ->pluck('brand_id'); $brands = \App\Models\Brand::where('status', 1)->whereIn('id', $brandIds)->orderBy('name')->limit(28)->get(); @endphp @if($useBuilder) @include('frontEnd.partials.grapes-content') @else @php $promoBanners = $promoBanners ?? collect(); @endphp @include('themes.gadget.pages.index-hero-categories') {{-- Top Selling --}} @if(!empty($hp['show_popular']) && $topSelling->count() > 0) Top Selling Products Get Most Demanded Products @foreach($topSelling as $product) @include('themes.gadget.layouts.product-card', compact('product')) @endforeach @endif @include('themes.gadget.pages.index-spotlight-grid') {{-- New Arrivals --}} @if(!empty($hp['show_new_arrivals']) && ($newArrivals ?? collect())->count() > 0) New Arrival Products This products listed by this month @foreach($newArrivals as $product) @include('themes.gadget.layouts.product-card', compact('product')) @endforeach View All → @endif {{-- Featured Products --}} @if(!empty($hp['show_bestsellers']) && $featuredItems->count() > 0) Featured Products Get Featured Product from here @foreach($featuredItems as $product) @include('themes.gadget.layouts.product-card', compact('product')) @endforeach @endif {{-- Shop By Brands --}} @if($brands->count() > 0) Shop By Brands @foreach($brands as $brand) {{ $brand->name }} @endforeach View All → @endif @endif @endsection
Get Most Demanded Products
This products listed by this month
Get Featured Product from here