@extends('frontend.layouts.master', ['page' => $page]) @section('content') @foreach ($page_builders as $r_key=>$page_builder) @if ($page_builder->style) @php $style = $page_builder->style; @endphp @else @php $style = \App\Models\Setting::first()->style; @endphp @endif @php $r_key_value = ++$r_key; $layout_style = get_page_row_layout_style($page_builder->id); $body_style = get_page_row_body_style($page_builder->id); $site_setting = site_setting(); @endphp
@if (count($page_builder->sections) > 0)
@foreach (\App\Models\PageBuilder\PageBuilderSection::where('page_builder_id', $page_builder->id)->get() as $pb)
@if (isset($pb->section->layout->slug)) @php $section = $pb->section; $file_name = $pb->section->layout->slug . '.blade.php'; $file_path = resource_path('views/livewire/frontend/layouts'); @endphp @if (is_file($file_path . '/' . $file_name) && file_exists($file_path . '/' . $file_name)) @livewire('frontend.layouts.' . $section->layout->slug, ['section_id' => $section->id,'builder_section_id'=>$pb->id,'place'=>'page']) @endif @elseif(isset($pb->section->form_id)) @if ($pb->section->heading_status) @php $path = 'views/frontend/layouts/section-heading'; @endphp @if (has_view_file(get_heading_design() . '.blade.php', $path)) @include('frontend.layouts.section-heading.' . get_heading_design(),['section' => $pb->section]) @endif @endif @include('frontend.pages.form', ['form_id' => $pb->section->form_id]) @endif @if(count($pb->rows)>0)
@foreach($pb->rows as $sub_row) @php $layout_style = get_page_row_layout_style($sub_row->id); $body_style = get_page_row_body_style($sub_row->id); @endphp
@if (count($sub_row->sections) > 0)
@foreach (\App\Models\PageBuilder\PageBuilderSection::where('page_builder_id', $sub_row->id)->get() as $pb)
@if (isset($pb->section->layout->slug)) @php $section = $pb->section; $file_name = $pb->section->layout->slug . '.blade.php'; $file_path = resource_path('views/livewire/frontend/layouts'); @endphp @if (is_file($file_path . '/' . $file_name) && file_exists($file_path . '/' . $file_name)) @livewire('frontend.layouts.' . $section->layout->slug, ['section_id' => $section->id,'builder_section_id'=>$pb->id,'place'=>'page']) @endif @elseif(isset($pb->section->form_id)) @if ($pb->section->heading_status) @php $path = 'views/frontend/layouts/section-heading'; @endphp @if (has_view_file(get_heading_design() . '.blade.php', $path)) @include('frontend.layouts.section-heading.' . get_heading_design(),['section' => $pb->section]) @endif @endif @include('frontend.pages.form', ['form_id' => $pb->section->form_id]) @endif
@endforeach
@endif
@endforeach
@endif
@endforeach
@endif
@endforeach @endsection