{!! html()->modelForm($setting_value, 'POST' , route('settingUpdate'))->attribute('enctype', 'multipart/form-data')->attribute('data-toggle', 'validator')->open() !!} {!! html()->hidden('id', null)->class('form-control') !!} {!! html()->hidden('page', $page)->class('form-control') !!}
@foreach($setting as $key => $value)

{{ str_replace('_',' ',$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
{!! html()->hidden('type[]', $key)->class('form-control') !!} @if($sub_keys == 'ENABLE/DISABLE')
{!! html()->radio('value[]', old('value[]', optional($data)->value) == 1, 1) ->class('custom-control-input') ->id('yes') !!} {!! html()->label(__('message.yes'))->for('yes')->class('custom-control-label') !!}
{!! html()->radio('value[]', old('value[]', optional($data)->value) == 0, 0) ->class('custom-control-input') ->id('no') !!} {!! html()->label(__('message.no'))->for('no')->class('custom-control-label') !!}
@else @endif
@endforeach
@endForeach
{!! html()->submit(__('message.save'))->class('btn btn-md btn-primary float-right') !!} {!! html()->form()->close() !!}