@foreach ($page['data']['sections'] ?? [] as $section) @foreach ($section['row'] as $row) @switch($row['type']) @case('single_image') @include('sections.hero-banner', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'background_image' => $row['desktop_image_url'], 'background_image_mobile' => $row['mobile_image_url'], ], 'data' => $row['column'], ]) @break @case('responsive_single_image') @include('sections.two-column-background2', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], ], 'data' => $row['column'], ]) @break @case('product') @include('sections.hero-banner-small', $section) @php // session(['productData' => $row['column']]) Cache::put('productData', $row['column']); @endphp @livewire('section.product.get-item-product', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], ], // 'data' => $row['column'] ]) @break @case('how_to_brew') @livewire('section.how-to-brew.get-banner', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $section['row'], ]) @livewire('section.how-to-brew.get-banner-detail', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @break @case('faq') @include('sections.post-block', [ 'sidebar' => 1, 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @break @case('article') @if (request()->is('cards')) @include('sections.articleCard', [ 'parent' => $page['data']['parent'] ?? '', 'content_type' => $row['content_type'] ?? '', 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @elseif(request()->is('card')) @include('sections.articleCard', [ 'parent' => $page['data']['parent'] ?? '', 'content_type' => $row['content_type'] ?? '', 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @else @include('sections.post-block', [ 'parent' => $page['data']['parent'] ?? '', 'content_type' => $row['content_type'] ?? '', 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @endif @break @case('store_location') @include('sections.find-store') @break @case('site_map') @include('sections.site-map', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @break @case('coffee_finder') @include('sections.form-carousel', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @break @case('coffee_finder_result') @include('sections.finder-result', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @break @case('gimmick_button') @include('sections.gimmick-button', [ 'section' => [ 'id' => $section['slug'] . '_' . $section['id'], 'style' => $section['style'], 'title' => $section['title'], ], 'data' => $row['column'], ]) @break @default @endswitch @endforeach @endforeach