@php use App\Services\StoreService; use App\Services\TranslationService; $store_settings = app(StoreService::class)->getStoreSettings(); $categories = $categories['categories']; $language_code = app(TranslationService::class)->getLanguageCode(); $category_section_title = $store_settings['category_section_title'] ?? 'Categories'; // dd(count($categories)); @endphp
{{-- safety and security --}} {{-- end safety and security --}} {{-- category section --}} @if (is_array($categories) && count($categories) >= 4)

{{ is_array($category_section_title) ? $category_section_title[$language_code] ?? ($category_section_title['en'] ?? reset($category_section_title)) : $category_section_title }}

@endif {{-- end category section --}} {{-- first feature section --}} @foreach ($sections as $count_key => $row) @if ($count_key == 0)
@foreach (collect($row->product_details)->take(4) as $details) @php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp @endforeach
@endif @endforeach {{-- end feature section --}} {{-- offer section --}} @if (count($offers) > 1) {{-- @dd('here'); --}}
@endif {{-- end offer section --}} {{-- second feature section --}} @foreach ($sections as $count_key => $row) @if ($count_key == 1)

{{ $row->title }}

{{ $row->short_description }}

@foreach (collect($row->product_details)->take(4) as $details) @php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp @endforeach
@endif @endforeach {{-- end second feature section --}} {{-- service section --}} {{-- end service section --}} {{-- brands --}} @if (isset($brands['brands']) && is_array($brands['brands']) && count($brands['brands']) >= 1)

{{ labels('front_messages.popular_brands', 'Popular Brands') }}

{{ labels('front_messages.explore_brands', 'Explore top picks in our Brands!') }}

@foreach ($brands['brands'] as $brand) @endforeach
@endif {{-- end brands --}} {{-- Remaining Featured Sections --}} @foreach ($sections as $count_key => $row) @if ($count_key > 1) @if (!empty($row->product_details) && count((array) $row->product_details) > 0) @if ($row->style == 'style_1')
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
@endif @if ($row->style == 'style_2')
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
{{ $row->title }}

{{ $row->title }}

{{ $row->short_description }}

{{ labels('front_messages.shop_now', 'Shop Now') }}
@endif @if ($row->style == 'style_3')
{{ $row->title }}

{{ $row->title }}

{{ $row->short_description }}

{{ labels('front_messages.explore_now', 'Explore Now') }}
@foreach ($row->product_details as $details)
@php $component = getProductDisplayComponent($store_settings); $details = (object) $details; @endphp
@endforeach
@endif @endif @endif @endforeach {{-- End Section --}} {{-- rating --}} @if (isset($ratings) && is_array($ratings) && count($ratings) >= 1)

What People Are Saying

@foreach (array_slice($ratings, 0, 6) as $rating)
{{ $rating->user_name ?: 'Anonymous' }}

{{ $rating->title ?: 'Customer Feedback' }}

@for ($i = 1; $i <= 5; $i++) @endfor

{{ $rating->comment ?: '' }}

{{ $rating->user_name ?: 'Anonymous' }}

Posted on {{ \Carbon\Carbon::parse($rating->created_at)->format('d/m/Y') }}

@endforeach
@endif {{-- end rating --}}