title: Laravel WhereIn or Wheren with where
body: <p>Im trying to design a query, but I have no idea where to start.</p>
  
  <p>I'll type it out how I want it to function.</p>
  
  <pre><code>    Items::whereIn('id',$ids)-&gt;orWhereIn('id_2',$ids)-&gt;where('type','!=',$type)-&gt;get();
  </code></pre>
  
  <p>Thats how I want it to work, but I know that wont work, because it will just ignore the WHERE type=$type query, because the whereIN's would have already pulled records, that dont adhere to the Where query.</p>
  
  <p>Basically I want the eloquent version of this...</p>
  
  <pre><code>  "SELECT * FROM items WHERE type!=$type AND (id IN (1,2,3) OR id_2 IN(1,2,3))"
  </code></pre>