title: Retrieve data between two dates in laravel
body: <p>I am using an eloquent query to retrieve data from a table. The table columns look like this:</p>
  
  <pre><code>id   started_at   finished_at   
  1    2016-06-01   2016-06-30  
  2    2016-05-03   2016-05-28  
  </code></pre>
  
  <p>What I want to do is, given a <code>$date</code> (ex: 2016-06-18 ) and get the data of the row, that the <code>$date</code> between started at and finished_at columns.</p>
  
  <p>I have found <code>whereBetween</code> clauses in <a href="https://laravel.com/docs/5.2/queries#where-clauses" rel="noreferrer">Laravel documentation</a>, but I do not have an idea to use it correctly.</p>