@php $selected_value = ''; if(isset($value) ){ if( is_array($value) && !empty($value) ){ $selected_value = $value; }else{ $selected_value = $value; } } $tab_key_id = $id; $label_id = time().'_'.rand(1,99999); $name = ''; if( !empty($repeater_id) ){ if( !empty($parent_rep) ){ $name = "$parent_rep".'['.$repeater_id.']['.$index.']['.$id.']'.(!empty($options) && is_array($options) ? '[]' :''); }else{ $name = "$repeater_id".'['.$index.']['.$id.']'.(!empty($options) && is_array($options) ? '[]' :''); } }else{ if( !empty($options) && is_array($options) ){ $id = !empty($id) ? $id.'[]' : ''; } $name = $id; } @endphp @if( !empty($repeater_type) && $repeater_type == 'single' ) @if( !empty($options) && is_array($options) ) @foreach($options as $key=> $single) @php $checked = false; if( !empty($selected_value) ){ if(in_array($key, $selected_value )){ $checked = true; } }elseif( !empty($default) && is_array($default) && in_array($key, $default ) ){ $checked = true; } $label_id = time().'_'.rand(1,99999); @endphp