@php $currency = \App\Models\AppSetting::getValue('currency_symbol', '₹'); $banner = $banners->first(); $heroImage = $banner?->image ? \App\Services\MediaStorage::url($banner->image) : null; $categorySection = $homeSections->first(fn ($section) => in_array($section['type'], ['categories', 'cuisine_grid'], true)); $subcategorySections = $homeSections->filter(fn ($section) => in_array($section['type'], ['subcategory_product_sections', 'subcategory_products', 'sub_category_products', 'subcategory_shelves'], true)); $productSections = $homeSections->filter(fn ($section) => collect($section['items'] ?? [])->contains(fn ($item) => data_get($item, 'price') !== null && data_get($item, 'restaurant_id') !== null)); $storeSections = $homeSections->filter(fn ($section) => in_array($section['type'], ['restaurant_grid', 'featured_restaurants', 'recommended_for_you', 'nearby_restaurants', 'popular_restaurants', 'new_arrivals', 'trending_near_you', 'shop_by_brand'], true)); @endphp InstaKart @include('services.partials.pwa-style', ['accent' => '#168A23', 'accentDark' => '#075A28'])
Deliver to{{ request('location', 'Choose delivery location') }}
@if($banner)

{{ $banner->title }}

{{ $banner->description }}

@if($heroImage){{ $banner->title }}@endif
@endif @if($categorySection && collect($categorySection['items'] ?? [])->isNotEmpty())
@foreach($categorySection['items'] as $category) @if(data_get($category, 'image_url') ?: data_get($category, 'image')){{ data_get($category, 'name') }}@elseG@endif {{ data_get($category, 'name') }} @endforeach
@endif @foreach($subcategorySections as $section) @php $shelves = collect($section['items'] ?? [])->filter(fn ($shelf) => collect(data_get($shelf, 'products', []))->isNotEmpty()); @endphp @if($shelves->isNotEmpty())

{{ $section['title'] ?? 'Shop By Subcategory' }}

View All →
@foreach($shelves as $shelf) @php $shelfProducts = collect(data_get($shelf, 'products', [])) ->filter(fn ($item) => data_get($item, 'price') !== null && data_get($item, 'restaurant_id') !== null) ->take(8); @endphp @if($shelfProducts->isNotEmpty())

{{ data_get($shelf, 'title') ?: data_get($shelf, 'name') }}

View All →
@foreach($shelfProducts as $item)
@if(data_get($item, 'image_url') ?: data_get($item, 'image')){{ data_get($item, 'name') }}@else
G
@endif

{{ data_get($item, 'name') }}

{{ data_get($item, 'restaurant_name') }}

{{ $currency }}{{ number_format(data_get($item, 'discounted_price') ?? data_get($item, 'price'), 0) }}+
@endforeach
@endif @endforeach
@endif @endforeach @foreach($productSections as $section)

{{ $section['title'] }}

View All →
@foreach($section['items'] as $item)
@if(data_get($item, 'image_url') ?: data_get($item, 'image')){{ data_get($item, 'name') }}@else
G
@endif

{{ data_get($item, 'name') }}

{{ data_get($item, 'restaurant_name') }}

{{ $currency }}{{ number_format(data_get($item, 'discounted_price') ?? data_get($item, 'price'), 0) }}+
@endforeach
@endforeach @foreach($storeSections as $section)

{{ $section['title'] }}

View All →
@forelse($section['items'] as $store) @if(data_get($store, 'logo_image') ?: data_get($store, 'image')){{ data_get($store, 'name') }}@else
S
@endif

{{ data_get($store, 'name') }}

{{ data_get($store, 'delivery_time') ? data_get($store, 'delivery_time').' min delivery' : 'Delivery time unavailable' }}

@empty
No stores are available in this section.
@endforelse
@endforeach
Quality Products
Fast Delivery
Customer Support
@include('services.partials.grocery-nav')