title: Laravel: how to add where clause using query builder?
body: <p>I have this query, made using Laravel query builder:</p>
  
  <pre><code>$rows = DB::table('elements')-&gt;where('type', 1);
  </code></pre>
  
  <p>That corresponds to: "SELECT * from elements WHERE type=1"</p>
  
  <p>Now, in some cases I need to add a second Where to create a query like this:</p>
  
  <pre><code>SELECT * from elements WHERE type=1 AND lang='EN'
  </code></pre>
  
  <p>Using classic <code>php</code> I'd do something like:</p>
  
  <pre><code>$sql = 'SELECT * from elements WHERE type=1';
  
  if($var==true) $sql .= " AND lang='EN'";
  </code></pre>
  
  <p>How can I do that using Laravel Query Builder?</p>
  
  <p>Thank you.</p>