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

增加相册分类


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

php
public function save(Request $request)
{
    $res = $this->M->save($request->param());
    return showSuccess($res);
}

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

php
// 验证规则
protected $rule = [
    'name'=>'require',
    'order'=>'integer|>=:0'
];

protected $scene = [
    ...
    'save'=>['name','order'],
];

路由 router/admin.php

php
Route::post('imageclass','admin.ImageClass/save');