@php $data = [ [ "heading" => "Banner Content", "fields" => [ ["type" => "text", "label" => "Title of the banner section", "key" => "s1_title" , "class" => "col-md-6"], ["type" => "text", "label" => "Sub title of Banner", "key" => "s1_sub_title" , "class" => "col-md-6"], ["type" => "video", "label" => "Banner Video", "key" => "s1_video_media_id", "class" => "col-md-12"], ["type" => "image", "label" => "Poster Image", "key" => "s3_poster_image_media_id", "class" => "col-md-6"], ] ], [ "heading" => "Testimonial Content", "fields" => [ ["type" => "text", "label" => "Title of the Testimonial section", "key" => "s2_title" , "class" => "col-md-12"], ["type" => "textarea", "label" => "Description of Testimonial", "key" => "s2_description" , "class" => "col-md-12"], ["type" => "button","label" => "All Testimonial","key" => "s2_button","href"=>route('admin.testimonials.index'),"class" => "col-md-12"], ] ], [ "heading" => "Moments Content", "fields" => [ ["type" => "text", "label" => "Title of the Moments section", "key" => "s3_title" , "class" => "col-md-12"], ["type" => "image", "label" => "Logo of Moments", "key" => "s3_logo_media_id", "class" => "col-md-6"], ["type" => "image", "label" => "Featured Image of Moments", "key" => "s3_feature_image_media_id", "class" => "col-md-6"], ["type" => "text", "label" => "Image Caption", "key" => "s3_image_caption" , "class" => "col-md-12"], ["type" => "button","label" => "All Moments Gallery","key" => "s3_button","href"=>route('admin.galleries.edit', [encrypt(1)]),"class" => "col-md-12"], ["type" => "textarea", "label" => "Description of Moments", "key" => "s3_description" , "class" => "col-md-12"], ["type" => "text","label" => "Button Text of Moments","key" => "s3_button_text","class" => "col-md-6"], ["type" => "text","label" => "Button Link of Moments","key" => "s3_button_link","class" => "col-md-6"], ] ], [ "heading" => "Walkthrough Content", "fields" => [ ["type" => "text", "label" => "Title of the Walkthrough ", "key" => "s4_title" , "class" => "col-md-12"], ["type" => "textarea", "label" => "Description ", "key" => "s4_description" , "class" => "col-md-12"], [ "type" => "button", "label" => "All Walkthrough Listing", "key" => "s3_button", "href"=>route('admin.listing-items.index',[10]), "hidden_value"=>[ "name" => "Walkthrough_listing_id", "value" =>"10" ], "class" => "col-md-12" ], ] ], ]; @endphp @foreach($data as $section)

{{ $section['heading'] }}

@foreach($section['fields'] as $field) @include("admin.static_pages._partials.inputs.{$field['type']}", [ "label" => $field['label'], "key" => $field['key'], "value" => $obj->content[$field['key']] ?? ($field['type'] === 'image' ? null : ''), "class" => (isset($field['class'])) ? $field['class'] : '', "href" => (isset($field['href'])) ? $field['href'] : '', "hidden_value" => $field['hidden_value'] ?? null ]) @endforeach

@endforeach