0
点赞
收藏
分享

微信扫一扫

tp6 模型 Call to a member function allowField() on null


$rs7 = (new static())->setSuffix($setSuffix_7d)->find($postdata['id']);
if(!empty($rs7)){//如果上面找不到,就不能更新
$rs7->allowField(['label','gid','phone','username','wx''])->save($postdata);//7天表 //模型出错,自动抛出,不用判断
}

举报

相关推荐

0 条评论