@php $data = [ [ "heading" => "Banner Content", "fields" => [ ["type" => "text", "label" => "Title of the banner section", "key" => "s1_title", "class" => "col-md-12"], ["type" => "image", "label" => "Banner Image", "key" => "s1_banner_media_id", "class" => "col-md-12"], ["type" => "text", "label" => "Project Name", "key" => "s1_project_name", "class" => "col-md-12"], ["type" => "image", "label" => "Small Logo Image", "key" => "s1_small_logo_media_id", "class" => "col-md-6"], ["type" => "text", "label" => "Small Logo Text", "key" => "s1_small_logo_text", "class" => "col-md-6"], ["type" => "text", "label" => "Years of Excellence label", "key" => "s1_years_excellence_label", "class" => "col-md-4"], ["type" => "text", "label" => "Number of Projects label", "key" => "s1_projects_label", "class" => "col-md-4"], ["type" => "text", "label" => "Number of Satisfied Customers label", "key" => "s1_customers_label", "class" => "col-md-4"], ["type" => "text", "label" => "Number of Years of Excellence", "key" => "s1_years_excellence_count", "class" => "col-md-4"], ["type" => "text", "label" => "Number of Projects", "key" => "s1_projects_count", "class" => "col-md-4"], ["type" => "text", "label" => "Number of Satisfied Customers", "key" => "s1_customers_count", "class" => "col-md-4"], ["type" => "image", "label" => "Certification Image", "key" => "s1_certification_media_id", "class" => "col-md-6"], ["type" => "text", "label" => "Certification Description", "key" => "s1_certification_desc", "class" => "col-md-6"], ] ], [ "heading" => "Project Section Content", "fields" => [ ["type" => "text", "label" => "Title of the Project section", "key" => "s2_title", "class" => "col-md-12"], ["type" => "button","label" => "All Project","key" => "s2_button","href"=>route('admin.projects.index'),"class" => "col-md-12"], ] ], [ "heading" => "Buying Process Section Content", "fields" => [ ["type" => "text", "label" => "Title of the Buying Process section", "key" => "s3_title", "class" => "col-md-12"], [ "type" => "button", "label" => "Buying Process Listing", "key" => "s3_button", "href"=>route('admin.listing-items.index',[1]), "hidden_value"=>[ "name" => "buying_processes_listing_id", "value" =>"1" ], "class" => "col-md-12" ], ] ], [ "heading" => "Why Choose Visharam Section Content", "fields" => [ ["type" => "text", "label" => "Title of the Why Choose Visharam", "key" => "s4_title", "class" => "col-md-12"], ["type" => "image", "label" => "First Block Image", "key" => "s4_block1_image_media_id", "class" => "col-md-4"], ["type" => "text", "label" => "First Block Title", "key" => "s4_block1_title", "class" => "col-md-4"], ["type" => "textarea", "label" => "First Block Content", "key" => "s4_block1_content", "class" => "col-md-4"], ["type" => "image", "label" => "Second Block Image", "key" => "s4_block2_image_media_id", "class" => "col-md-4"], ["type" => "text", "label" => "Second Block Title", "key" => "s4_block2_title", "class" => "col-md-4"], ["type" => "textarea", "label" => "Second Block Content", "key" => "s4_block2_content", "class" => "col-md-4"], ["type" => "video", "label" => "Third Block Video", "key" => "s4_block3_video_media_id", "class" => "col-md-6"], ["type" => "text", "label" => "Third Block Title", "key" => "s4_block3_title", "class" => "col-md-6"], ["type" => "image", "label" => "Fourth Block Image", "key" => "s4_block4_image_media_id", "class" => "col-md-6"], ["type" => "text", "label" => "Fourth Block Title", "key" => "s4_block4_title", "class" => "col-md-6"], ] ], [ "heading" => "Widget Section Content", "fields" => [ ["type" => "button","label" => "All Widgets","key" => "s3_button","href"=>route('admin.widgets.index'),"class" => "col-md-12"], ] ], [ "heading" => "Explore More Section Content", "fields" => [ ["type" => "text", "label" => "Title of the Explore More section", "key" => "s7_explore_more_title", "class" => "col-md-12"], ["type" => "textarea", "label" => "Description of the Explore More section", "key" => "s7_explore_more_description", "class" => "col-md-12"], ["type" => "text", "label" => "Explore More Button Text", "key" => "s7_explore_more_button_text", "class" => "col-md-6"], ["type" => "text", "label" => "Explore More Button Link", "key" => "s7_explore_more_button_link", "class" => "col-md-6"], ] ] ]; @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