title: WhereBetween dates with cast in laravel
body: <p>Recently I've used <strong>whereBetween</strong> to get the date range of both dates but the result is not inclusive in same date. So I come out with this query.</p>
  
  <pre><code>SELECT *
  FROM student
  WHERE cast(created_at as date) BETWEEN '2019-07-21' AND '2019-07-21'
  </code></pre>
  
  <p>Now, since I'm just new in laravel. How can I adopt this query to laravel?</p>
  
  <p>Here is my code in laravel:</p>
  
  <pre><code>$student = $this-&gt;student
  -&gt;whereBetween('created_at', ['2019-07-21', '2019-07-21'])
  -&gt;select('*')
  -&gt;get()
  </code></pre>
  
  <p>I dont know how to add cast in whereBetween. Can somebody help me?</p>