@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