title: Lumen/Laravel query builder - BETWEEN
body: <p>I'm attempting to convert this tradtional <code>sql</code> query to <code>larvael/lumen</code> query builder and running into brick walls.</p>
  
  <pre><code>$query = "SELECT a.id, a.name, a.cuisine, a.status, a.new, a.addressLine1, a.addressLine2, a.addressLine3, a.city, a.weekendot, a.weekendct, b.class
      FROM restaurants a, restaurants_class b
      WHERE a.class = b.id
      AND '$date' = CURRENT_DATE
      AND '$ntime' BETWEEN a.weekendot AND a.weekendct
      ORDER BY id DESC";
  </code></pre>
  
  <p><code>$date</code> and <code>$ntime</code> are variables.</p>
  
  <p>This is what I have so far;</p>
  
  <pre><code>$posts = DB::connection('web')
          -&gt;table('restaurants')
          -&gt;join('restaurants_class', 'restaurants.class', '=', 'restaurants_class.id')
          -&gt;select('restaurants.*', 'restaurants_class.*')
          -&gt;get();
  </code></pre>
  
  <p>The first <code>AND</code> statement is not getting anything from the <code>DB</code></p>
  
  <p>The second <code>AND</code> statement is comparing a <code>var</code> to two columns in the <code>DB</code></p>
  
  <p>Not sure how to implement the <code>whereBetween</code></p>