Pivot table child queries respect where conditions added through wherePivot()
Merge pull request #5752 from JamShady/pull-request/pivots-respect-where-clauses

[4.2] Pivot table correctly respects wherePivot() conditions
Merge branch '4.2'