title: laravel 5.1 : how can i have two wherePivot in eloquent?
body: <p>I need check two where conditions on a pivot table. I know that I can check one condition with this:</p>
  
  <pre><code>$dis = $user-&gt;discounts()-&gt;wherePivot('used_for_id', '=', null)
  </code></pre>
  
  <p>However, I want two where conditions. When I use <code>orWherePivot</code>, the two where conditions are <code>OR</code>ed together, but I want them to be <code>AND</code>ed together.</p>
  
  <pre><code>$whereData = [
      ['id', "=", $discountId],
      ['used_for_id', "=", null]
  ];
  </code></pre>