withJoin添加where条件

浏览:1483 发布日期:2021/02/26 分类:ThinkPHP6专区 关键字: where
$thread = ThreadLikeModel::withJoin(['thread'=>function($query) use($args){
$query->withField(['id','title','status'])->where('status',1);
}])->where('user_id',$userId)->paginate($args['limit']);

withJoin闭包里添加where条件,为啥没效果呢
最佳答案
评论( 相关
后面还有条评论,点击查看>>