Looking into Filtering Queries Via Intermediate Table Columns.
return $this->belongsToMany(Role::class) ->wherePivotIn(\'priority\', [1, 2])