Getting models through pivot

后端 未结 0 1188
忘了有多久
忘了有多久 2020-12-22 08:41

Looking into Filtering Queries Via Intermediate Table Columns.

return $this->belongsToMany(Role::class)
            ->wherePivotIn(\'priority\', [1, 2])         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题