企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
``` controlelr ~~~ $data = collection($data)->toArray(); $arr = []; foreach($data as $k=>$v){ $arr[$v['id']] = $v['name']; } $this->view->assign("arr", $arr); ~~~ add ~~~ <div class="form-group"> <label class="control-label col-xs-12 col-sm-2">{:__('Value')}:</label> <div class="col-xs-12 col-sm-8"> {:build_checkboxs('row[value][]', $arr);} </div> </div> ~~~ edit ~~~ <div class="form-group"> <label class="control-label col-xs-12 col-sm-2">{:__('Value')}:</label> <div class="col-xs-12 col-sm-8"> {:build_checkboxs('row[value][]', $arr,$row['value']);} </div> </div> ~~~ ```