@extends('layouts.app') @section('page-title') {{ __('Home Page Settings') }} @endsection @section('breadcrumb') @endsection @php $profile = asset(Storage::url('upload/profile')); $settings = settings(); $activeTab = session('tab', 'profile_tab_1'); @endphp @push('script-page') @endpush @section('content')
@if (Gate::check('edit home page'))
@foreach ($HomePage as $section)
{{ Form::model($section, ['route' => ['homepage.update', encrypt($section->id)], 'method' => 'PUT', 'enctype' => 'multipart/form-data']) }}
{{ Form::label('name', __('Name'), ['class' => 'form-label']) }} {{ Form::text('content_value[name]', !empty($section->content_value['name']) ? $section->content_value['name'] : $section->title, ['class' => 'form-control', 'placeholder' => __('Enter Section name')]) }}
@if ($section->section == 'Section 0')
{{ Form::label('Menu_pages', __('Menu Pages'), ['class' => 'form-label']) }} {!! Form::select('content_value[menu_pages][]', $pages, null, [ 'class' => 'form-control select2', 'multiple', ]) !!}
@endif @if ($section->section == 'Section 1')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('title', __('Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[title]', !empty($section->content_value['title']) ? $section->content_value['title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Section name')]) }}
{{ Form::label('sub_title', __('Sub Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[sub_title]', !empty($section->content_value['sub_title']) ? $section->content_value['sub_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter sub title')]) }}
{{ Form::label('btn_name', __('Button Name'), ['class' => 'form-label']) }} {{ Form::text('content_value[btn_name]', !empty($section->content_value['btn_name']) ? $section->content_value['btn_name'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Button Name')]) }}
{{ Form::label('btn_link', __('Button Link'), ['class' => 'form-label']) }} {{ Form::text('content_value[btn_link]', !empty($section->content_value['btn_link']) ? $section->content_value['btn_link'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Button Link')]) }}
{{ Form::label('section_footer_text', __('Header Sub Text'), ['class' => 'form-label']) }} {{ Form::text('content_value[section_footer_text]', !empty($section->content_value['section_footer_text']) ? $section->content_value['section_footer_text'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Footer Text')]) }}
{{ Form::label('section_footer_image', __('Header Sub Image'), ['class' => 'form-label']) }} {{ Form::file('content_value[section_footer_image]', ['class' => 'form-control']) }}
{{ Form::label('section_main_image', __('Main Image'), ['class' => 'form-label']) }} {{ Form::file('content_value[section_main_image]', ['class' => 'form-control']) }}
@endif @if ($section->section == 'Section 2')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
@for ($i = 1; $i <= 3; $i++)
{{ Form::label('Box' . $i . '_title', $i . __(' Box Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Box' . $i . '_title]', !empty($section->content_value['Box' . $i . '_title']) ? $section->content_value['Box' . $i . '_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Box Name')]) }}
{{ Form::label('Box' . $i . '_number', $i . __(' Box Number'), ['class' => 'form-label']) }} {{ Form::text('content_value[Box' . $i . '_number]', !empty($section->content_value['Box' . $i . '_number']) ? $section->content_value['Box' . $i . '_number'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Box Number')]) }}
{{ Form::label('Box' . $i . '_Image', $i . __(' Box Image'), ['class' => 'form-label']) }} {{ Form::file('content_value[box' . $i . '_number_image]', ['class' => 'form-control']) }}
@endfor @endif @if ($section->section == 'Section 3')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
@for ($i = 1; $i <= 2; $i++)
{{ Form::label('Box' . $i . '_title', $i . __(' Box Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Box' . $i . '_title]', !empty($section->content_value['Box' . $i . '_title']) ? $section->content_value['Box' . $i . '_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Box Name')]) }}
{{ Form::label('Box' . $i . '_image', __(' Box image'), ['class' => 'form-label']) }} {{ Form::file('content_value[Box' . $i . '_image]', ['class' => 'form-control']) }}
{{ Form::label('Box' . $i . '_info', $i . __(' Box info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Box' . $i . '_info]', !empty($section->content_value['Box' . $i . '_info']) ? $section->content_value['Box' . $i . '_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Box info')]) }}
@if (!empty($section->content_value['Box' . $i . '_list'])) @foreach ($section->content_value['Box' . $i . '_list'] as $Box_list_key => $Box_list)
{{ Form::label('Box' . $i . '_list', __('Point'), ['class' => 'form-label']) }} {{ Form::text('content_value[Box' . $i . '_list][]', !empty($section->content_value['Box' . $i . '_list'][$Box_list_key]) ? $section->content_value['Box' . $i . '_list'][$Box_list_key] : '', ['class' => 'form-control', 'placeholder' => __('Enter date')]) }}
@endforeach @else
{{ Form::label('Box' . $i . '_list', __('Point'), ['class' => 'form-label']) }} {{ Form::text('content_value[Box' . $i . '_list][]', !empty($section->content_value['Box' . $i . '_list']) ? $section->content_value['Box' . $i . '_list'] : '', ['class' => 'form-control', 'placeholder' => __('Enter date')]) }}
@endif
@endfor @endif @if ($section->section == 'Section 4')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('Sec4_title', __('Main Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec4_title]', !empty($section->content_value['Sec4_title']) ? $section->content_value['Sec4_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('Sec4_info', __('Main Info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec4_info]', !empty($section->content_value['Sec4_info']) ? $section->content_value['Sec4_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@for ($is4 = 1; $is4 <= 6; $is4++)
{{ Form::label('sec4_info', __('Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec4_box' . $is4 . '_title]', !empty($section->content_value['Sec4_box' . $is4 . '_title']) ? $section->content_value['Sec4_box' . $is4 . '_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('sec4_image', __('Image'), ['class' => 'form-label']) }} {{ Form::file('content_value[Sec4_box' . $is4 . '_image]', ['class' => 'form-control']) }}
{{ Form::label('enabled_email', __('Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[Sec4_box' . $is4 . '_enabled]', 'deactive') }} {{ Form::checkbox('content_value[Sec4_box' . $is4 . '_enabled]', 'active', !empty($section->content_value['Sec4_box' . $is4 . '_enabled']) && $section->content_value['Sec4_box' . $is4 . '_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('sec4_image', __('Info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec4_box' . $is4 . '_info]', !empty($section->content_value['Sec4_box' . $is4 . '_info']) ? $section->content_value['Sec4_box' . $is4 . '_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@endfor @endif @if ($section->section == 'Section 5')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('Sec5_title', __('Main Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec5_title]', !empty($section->content_value['Sec5_title']) ? $section->content_value['Sec5_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('Sec5_info', __('Main Info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec5_info]', !empty($section->content_value['Sec5_info']) ? $section->content_value['Sec5_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@endif @if ($section->section == 'Section 6')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('Sec6_title', __('Main Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec6_title]', !empty($section->content_value['Sec6_title']) ? $section->content_value['Sec6_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('Sec6_info', __('Main Info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec6_info]', !empty($section->content_value['Sec6_info']) ? $section->content_value['Sec6_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@if (!empty($section->content_value['Sec6_Box_title'])) @foreach ($section->content_value['Sec6_Box_title'] as $Box_title_key => $Box_title)
{{ Form::label('Sec6_Box_title', __('Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec6_Box_title][]', !empty($section->content_value['Sec6_Box_title'][$Box_title_key]) ? $section->content_value['Sec6_Box_title'][$Box_title_key] : '', ['class' => 'form-control', 'placeholder' => __('Enter date')]) }}
{{ Form::label('Sec6_Box_subtitle', __('Sub Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec6_Box_subtitle][]', !empty($section->content_value['Sec6_Box_subtitle'][$Box_title_key]) ? $section->content_value['Sec6_Box_subtitle'][$Box_title_key] : '', ['class' => 'form-control', 'placeholder' => __('Enter date')]) }}
{{ Form::label('Sec6_Box_image', __('Image'), ['class' => 'form-label']) }} {{ Form::file('content_value[Sec6_box_image][]', ['class' => 'form-control']) }}
@endforeach @else
{{ Form::label('Sec6_Box_title', __('Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec6_Box_title][]', null, ['class' => 'form-control', 'placeholder' => __('Enter date')]) }}
{{ Form::label('Sec6_Box_subtitle', __('Sub Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec6_Box_subtitle][]', null, ['class' => 'form-control', 'placeholder' => __('Enter date')]) }}
{{ Form::label('Sec6_Box_image', __('Image'), ['class' => 'form-label']) }} {{ Form::file('content_value[Sec6_box_image][]', ['class' => 'form-control']) }}
@endif
@endif @if ($section->section == 'Section 7')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('Sec7_title', __('Main Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec7_title]', !empty($section->content_value['Sec7_title']) ? $section->content_value['Sec7_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('Sec7_info', __('Main Info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec7_info]', !empty($section->content_value['Sec7_info']) ? $section->content_value['Sec7_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@for ($is7 = 1; $is7 <= 8; $is7++)
{{ Form::label('Sec7_box' . $is7 . '_name', __('Name'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec7_box' . $is7 . '_name]', !empty($section->content_value['Sec7_box' . $is7 . '_name']) ? $section->content_value['Sec7_box' . $is7 . '_name'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('Sec7_box' . $is7 . '_tag', __('Tag'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec7_box' . $is7 . '_tag]', !empty($section->content_value['Sec7_box' . $is7 . '_tag']) ? $section->content_value['Sec7_box' . $is7 . '_tag'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('Sec7_box' . $is7 . '_info', __('Main Info'), ['class' => 'form-label']) }} {{ Form::file('content_value[Sec7_box' . $is7 . '_image]', ['class' => 'form-control']) }}
{{ Form::label('Sec7_box' . $is7 . '_Enabled', __('Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[Sec7_box' . $is7 . '_Enabled]', 'deactive') }} {{ Form::checkbox('content_value[Sec7_box' . $is7 . '_Enabled]', 'active', !empty($section->content_value['Sec7_box' . $is7 . '_Enabled']) && $section->content_value['Sec7_box' . $is7 . '_Enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('Sec7_box' . $is7 . '_review', __('Review'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec7_box' . $is7 . '_review]', !empty($section->content_value['Sec7_box' . $is7 . '_review']) ? $section->content_value['Sec7_box' . $is7 . '_review'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@endfor @endif @if ($section->section == 'Section 8')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('Sec8_title', __('Main Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec8_title]', !empty($section->content_value['Sec8_title']) ? $section->content_value['Sec8_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@for ($is8 = 1; $is8 <= 8; $is8++)
{{ Form::label('Sec8_box' . $is8 . '_info', __('Main Info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec8_box' . $is8 . '_info]', !empty($section->content_value['Sec8_box' . $is8 . '_info']) ? $section->content_value['Sec8_box' . $is8 . '_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@endfor @endif @if ($section->section == 'Section 9')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('Sec9_title', __('Main Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec9_title]', !empty($section->content_value['Sec9_title']) ? $section->content_value['Sec9_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('Sec9_info', __('Main Info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec9_info]', !empty($section->content_value['Sec9_info']) ? $section->content_value['Sec9_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@endif @if ($section->section == 'Section 10')
{{ Form::label('enabled_email', __('Section Enabled'), ['class' => 'form-label']) }}
{{ Form::hidden('content_value[section_enabled]', 'deactive') }} {{ Form::checkbox('content_value[section_enabled]', 'active', !empty($section->content_value['section_enabled']) && $section->content_value['section_enabled'] == 'active' ? true : false, ['class' => 'form-check-input', 'role' => 'switch', 'id' => 'section_enabled']) }}
{{ Form::label('Sec10_title', __('Main Title'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec10_title]', !empty($section->content_value['Sec10_title']) ? $section->content_value['Sec10_title'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
{{ Form::label('Sec10_info', __('Main Info'), ['class' => 'form-label']) }} {{ Form::text('content_value[Sec10_info]', !empty($section->content_value['Sec10_info']) ? $section->content_value['Sec10_info'] : '', ['class' => 'form-control', 'placeholder' => __('Enter Data')]) }}
@endif
{{ Form::submit(__('Save'), ['class' => 'btn btn-secondary btn-rounded']) }}
{{ Form::close() }}
@endforeach
@endif
@endsection