title: Using multiple where clauses with laravel query builder
body: <p>I'm having a lot of trouble converting the following SQL query to work with Laravel's query builder.</p>
  
  <pre><code>SELECT * FROM gifts 
  JOIN giftcategory ON gifts.id = giftcategory.giftid
  JOIN giftoccasions ON gifts.id = giftoccasions.giftid
  JOIN giftrelationship ON gifts.id = giftrelationship.giftid
  
  WHERE (gifts.gender = 'any' OR gifts.gender = 'male')
  AND giftoccasions.occasionid = '2'
  AND (giftcategory.categoryid = '0' OR giftcategory.categoryid = '1')
  AND giftrelationship.relationshipid = '1'
  </code></pre>
  
  <p>This query works fine, but I can't get the same results when using Laravel's query builder. I have the following code so far. It is not working correctly at all. I'm thinking the issue could lie with the <code>orWhere</code> part because it seems to be returning results that don't match any of the other where clauses.</p>
  
  <pre><code>$giftQuery = DB::Table('gifts')
  -&gt;Join('giftcategory', 'gifts.id', '=', 'giftcategory.giftid')
  -&gt;Join('giftoccasions', 'gifts.id', '=', 'giftoccasions.giftid')
  -&gt;where('gifts.gender', '=', "male")
  -&gt;orwhere('gifts.gender', '=', "any")
  -&gt;where('giftoccasions.occasionid', '=', "2")
  -&gt;where('giftoccasions.relationshipid', '=', "1")
  -&gt;Where('giftcategory.categoryid', '=', "0")
  -&gt;orWhere('giftcategory.categoryid', '=', "1");
  </code></pre>