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

删除运费模板策略


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

php
public function delete($id)
{
    return showSuccess($this->request->Model->delete());
}

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

php
// 验证规则
protected $rule = [
    ...
    'id'=>'require|integer|>:0|isExist:ExpressValue',
    ...
];

protected $scene = [
    // ...
    'delete'=>['id'],
];

路由 router/admin.php

php
Route::post('express_value/:id/delete','admin.ExpressValue/delete');