use app\common\model\CommunityClassify as CCModel;
$result = CCModel::validate(true)->save($data);
if (false !== $result) {
return $this->success('新增成功',url('classify'));
}
else {
return $this->error(CCModel::getError(), '');
}
如上代码,,定义model别名后,验证器出错。怎么解决。Non-static method think\Model::validate() should not be called statically, assuming $this from incompatible context
最佳答案
