多对多怎么通过中间表字段过滤关联关系,比如wherePivot,wherePivotIn

浏览:1252 发布日期:2019/12/30 分类:ThinkPHP5专区
return $this->belongsToMany('App\Role')->wherePivot('approved', 1);

return $this->belongsToMany('App\Role')->wherePivotIn('priority', [1, 2]);
最佳答案
评论( 相关
后面还有条评论,点击查看>>