@php $data = [ [ "heading" => "Banner Content", "fields" => [ ["type" => "text", "label" => "Title of the banner section", "key" => "s1_title"], ["type" => "image", "label" => "Banner Image", "key" => "s1_media_id"], ["type" => "text", "label" => "Imgae Text", "key" => "s1_image_text"], ["type" => "textarea", "label" => "Content of Banner", "key" => "s1_content"], ] ], [ "heading" => "Corporate Video", "fields" => [ ["type" => "text", "label" => "Title", "key" => "s2_title"], ["type" => "text", "label" => "Heading", "key" => "s2_heading"], ["type" => "video", "label" => "Video", "key" => "s2_media_id"], ["type" => "text", "label" => "Button Text", "key" => "s2_button_text"], ["type" => "text", "label" => "Youtube video link", "key" => "s2_youtube_video_link"], ] ], [ "heading" => "our Journey", "fields" => [ ["type" => "text", "label" => "Title", "key" => "s3_title"], ["type" => "textarea", "label" => "Content", "key" => "s3_content_1"], ["type" => "image", "label" => "Image_1", "key" => "s3_media_id_1"], ["type" => "image", "label" => "Image_2", "key" => "s3_media_id_2"], ["type" => "text", "label" => "count", "key" => "s3_count"], ["type" => "image", "label" => "Image_3", "key" => "s3_media_id_3"], ["type" => "textarea", "label" => "Content", "key" => "s3_content_3"], ] ], [ "heading" => "Recognitions", "fields" => [ ["type" => "image", "label" => "Background Image", "key" => "s4_media_id"], ["type" => "text", "label" => "Title", "key" => "s4_title"], ["type" => "text", "label" => "Short Description", "key" => "s4_content"], ] ], [ "heading" => "Awards", "fields" => [ [ "type" => "button", "label" => "Awards Listing", "key" => "s2_button", "href"=>route('admin.listing-items.index',[9]), "hidden_value"=>[ "name" => "awards_listing_id", "value" =>"9" ], "class" => "col-md-12" ], ] ], [ "heading" => "Our Vision", "fields" => [ ["type" => "text", "label" => "Title", "key" => "s6_title"], ["type" => "text", "label" => "Heading", "key" => "s6_heading"], ["type" => "video", "label" => "Video", "key" => "s6_media_id"], ] ], [ "heading" => "Our Mission", "fields" => [ ["type" => "text", "label" => "Title", "key" => "s7_title"], ["type" => "text", "label" => "Heading", "key" => "s7_heading"], ["type" => "video", "label" => "Video", "key" => "s7_media_id"], ] ], [ "heading" => "Message from founder", "fields" => [ ["type" => "text", "label" => "Title", "key" => "s8_title"], ["type" => "text", "label" => "Founder Name", "key" => "s8_founder_name"], ["type" => "image", "label" => "Founder Thumb Image", "key" => "s8_media_id_founder_thumb_image"], ["type" => "video", "label" => "Founder Thumb Video", "key" => "s8_media_id_founder_thumb_video"], ["type" => "text", "label" => "Popup Youtube Link", "key" => "s8_youtube_link"], ["type" => "video", "label" => "Popup Founder Video", "key" => "s8_media_id_founder_video"], ["type" => "textarea", "label" => "Message", "key" => "s8_message"], ] ], [ "heading" => "Team", "fields" => [ ["type" => "text", "label" => "Title", "key" => "s9_title"], ] ] ]; @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