On this page
批量删除订单
控制器 app/controller/admin/Order.php
php
public function deleteAll()
{
$param = $this->request->param('ids');
return showSuccess($this->M->where('id','in',$param)->delete());
}
验证器 app/validate/admin/Order.php
php
// 验证规则
protected $rule = [
// ...
'ids'=>'require|array'
// ...
];
protected $scene = [
// ...
'deleteAll'=>['ids']
];
路由 router/admin.php
php
Route::post('order/delete_all','admin.Order/deleteAll');