{{ Form::model($setting_value, ['method' => 'POST','route' => ['settingUpdate'],'enctype'=>'multipart/form-data','data-toggle'=>'validator']) }} {{ Form::hidden('id', null, ['class' => 'form-control'] ) }} {{ Form::hidden('page', $page, ['class' => 'form-control'] ) }}
@foreach($setting as $key => $value)

{{ $key }}

@foreach($value as $sub_keys => $sub_value) @php $data=null; foreach($setting_value as $v){ if($v->key==($key.'_'.$sub_keys)){ $data = $v; } } $class = 'col-md-6'; $type = 'text'; switch ($key){ case 'FIREBASE': $class = 'col-md-12'; break; case 'COLOR' : $type = 'color'; break; case 'DISTANCE' : $type = 'number'; break; default : break; } @endphp
{{ Form::hidden('type[]', $key , ['class' => 'form-control'] ) }} @if($key == 'CURRENCY' && $sub_keys == 'CODE') @php $currency_code = $data->value ?? 'USD'; $currency = currencyArray($currency_code); @endphp @elseif($key == 'CURRENCY' && $sub_keys == 'POSITION') {{ Form::select('value[]',['left' => __('message.left') , 'right' => __('message.right') ], isset($data) ? $data->value : 'left',[ 'class' =>'form-control select2js']) }} @elseif($key == 'RIDE' && $sub_keys == 'FOR_OTHER') {{ Form::select('value[]',['0' => __('message.no'), '1' => __('message.yes') ], isset($data) ? $data->value : '0', [ 'class' =>'form-control select2js'] ) }} @else @endif
@endforeach
{!! Form::submit( __('message.save'), [ 'class' => 'btn btn-md btn-primary' ]) !!}
@endForeach
{{ Form::submit(__('message.save'), ['class'=>"btn btn-md btn-primary float-md-right"]) }} {{ Form::close() }}