Skip to content
关注公众号,获取新课通知

商品规格卡片属性排序


控制器 app/controller/admin/GoodsSkusCardValue.php

php
public function sort(){
	$data = request()->param('sortdata');
	return showSuccess($this->M->saveAll($data));
}

验证器 app/validate/admin/GoodsSkusCardValue.php

php
// 验证规则
protected $rule = [
    // ...
	'sortdata'=>'require|array',
    // ...
];

protected $scene = [
    // ...
    'sort'=>['sortdata']
];

路由 router/admin.php

php
Route::post('goods_skus_card_value/sort','admin.GoodsSkusCardValue/sort');