$v1){ $_v1 = explode('|',$v1); $arr[$_v1[0]]=$_v1[1]; } } return $arr; } return $v; } public function getValueAttr($v,$row){ if(in_array( $row['type'] ,['checkbox','select','selects'])){ return json_decode($v,true); } return $v; } public function setSettingAttr($v){ if(is_array($v)){ return json_encode($v,JSON_UNESCAPED_UNICODE); } return $v; } function setRuleAttr($v,$row){ if(is_array($v)){ return implode(';',$v); }else{ return $v; } } function getSettingAttr($v='',$row=[]){ if($v){ return json_decode($v,true); } return []; } // function setValueAttr($v,$row){ // if(is_array($v)){ // return implode(',',$v); // }else{ // return $v; // } // } }