TP5 일괄 추가 학습 $attr_count = input('post.attr_name/a'); //批量添加规格属性<br>
foreach($attr_count as $keys=>$v){//批量添加规格属性<br>
<br>
$list[]=[<br>
'attr_id'=>input('post.attr_id/a')[$keys],<br>
'attr_name'=>input('post.attr_name/a')[$keys],<br>
'attr_value'=>input('post.attr_value/a')[$keys],<br>
'attr_cps'=>input('post.attr_cps/a')[$keys],<br>
'if_task'=>input('post.if_task/a')[$keys],<br>
'role_id'=>input('post.role_id/a')[$keys],<br>
'radios'=>input('post.radios/a')[$keys],<br>
];<br>
}<br>
$model->attr()->saveAll($list);