// +---------------------------------------------------------------------- namespace app\admin\validate; use think\Validate; /** * 菜单验证器 */ class AuthRule extends Validate { //定义验证规则 protected $rule = [ 'parentid|上级菜单' => 'require|number', 'name|规则' => 'require|unique:AuthRule', 'title|标题' => 'require', ]; }