@component('components.widget', ['class' => 'box-primary', 'title' => __('cms::lang.features')])
@php
$feature = [];
if(
isset($page_meta['feature']) &&
isset($page_meta['feature']['meta_value']) &&
!empty($page_meta['feature']['meta_value'])
) {
$feature = json_decode($page_meta['feature']['meta_value'], true);
}
@endphp
{!! Form::label('feature_title', __('cms::lang.title') . ':*' )!!}
{!! Form::text('meta[feature][title]', (isset($feature['title']) && !empty($feature['title'])) ? $feature['title'] : null, ['class' => 'form-control', 'id' => 'feature_title']) !!}
{!! Form::label('feature_content', __('cms::lang.description') . ':*' )!!}
{!! Form::textarea('meta[feature][description]', (isset($feature['description']) && !empty($feature['description'])) ? $feature['description'] : null, ['class' => 'form-control', 'id'=>'feature_content']) !!}
@for($i=0; $i<10; $i++)
@php
$feature_icon = '';
$feature_title = '';
$feature_description = '';
if(isset($feature['content']) && !empty($feature['content'])) {
$feature_icon = (isset($feature['content'][$i]) && isset($feature['content'][$i]['icon'])) ? $feature['content'][$i]['icon'] : '';
$feature_title = (isset($feature['content'][$i]) && isset($feature['content'][$i]['title'])) ? $feature['content'][$i]['title'] : '';
$feature_description = (isset($feature['content'][$i]) && isset($feature['content'][$i]['description'])) ? $feature['content'][$i]['description'] : '';
}
@endphp
{!! Form::label('input_feature_icon_'.$i, __('cms::lang.icon') . ':' )!!}
{!! Form::label('meta_feature_title_'.$i, __('cms::lang.title') . ':' )!!}
{!! Form::text('meta[feature][content]['.$i.'][title]', $feature_title, ['class' => 'form-control', 'id' => 'meta_feature_title_'.$i, 'placeholder' => __('cms::lang.title')]) !!}
{!! Form::label('meta_feature_description_'.$i, __('cms::lang.description') . ':' )!!}
{!! Form::textarea('meta[feature][content]['.$i.'][description]', $feature_description, ['class' => 'form-control', 'rows' => 2, 'id' => 'meta_feature_description_'.$i, 'placeholder' => __('cms::lang.description')]) !!}
@endfor
@endcomponent