@php $data = [ [ "heading" => "Journey Content", "fields" => [ ["type" => "text", "label" => "Sub Title of the Journey section", "key" => "s2_sub_title", "class" => "col-md-6"], ["type" => "text", "label" => "Title of the Journey section", "key" => "s2_title", "class" => "col-md-6"], ["type" => "textarea", "label" => "Content of Journey", "key" => "s2_content" , "class" => "col-md-12"], [ "type" => "button", "label" => "Journey Listing", "key" => "s2_button", "href"=>route('admin.listing-items.index',[5]), "hidden_value"=>[ "name" => "journey_listing_id", "value" =>"5" ], "class" => "col-md-12" ], ["type" => "text", "label" => "Link of Journey section", "key" => "s2_link", "class" => "col-md-12"], ] ], [ "heading" => "Project Section Content", "fields" => [ ["type" => "text", "label" => "Title of the Project section", "key" => "s3_title", "class" => "col-md-12"], ["type" => "button","label" => "All Project","key" => "s3_button","href"=>route('admin.projects.index'),"class" => "col-md-12"], ] ], [ "heading" => "Inside Section Content", "fields" => [ ["type" => "video", "label" => "Walkthrough Video", "key" => "s4_walkthrough_video_media_id", "class" => "col-md-6"], ["type" => "text", "label" => " Title 1", "key" => "s4_title_1", "class" => "col-md-6"], ["type" => "video", "label" => "Stories Video", "key" => "s4_stories_video_media_id", "class" => "col-md-6"], ["type" => "text", "label" => " Title 2", "key" => "s4_title_2", "class" => "col-md-6"], ["type" => "video", "label" => "Testimonials Video", "key" => "s4_testimonials_video_media_id", "class" => "col-md-6"], ["type" => "text", "label" => "Title 3", "key" => "s4_title_3", "class" => "col-md-6"], ["type" => "text", "label" => "Link", "key" => "s4_link", "class" => "col-md-12"], ] ], [ "heading" => "Service Section Content", "fields" => [ ["type" => "text", "label" => "Title of the Service section", "key" => "s5_title", "class" => "col-md-12"], ["type" => "button","label" => "All Service","key" => "s5_button","href"=>route('admin.services.index'),"class" => "col-md-12"], ] ], [ "heading" => "Widget Section Content", "fields" => [ ["type" => "button","label" => "All Widgets","key" => "s3_button","href"=>route('admin.widgets.index'),"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