title: How to filter data after particular date in laravel 8
body: <p>I want to filter the data between the dates. I have used <code>WhereBetween</code> but it is not working.</p>
  <p><a href="https://i.stack.imgur.com/xKwqt.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/xKwqt.png" alt="table data" /></a></p>
  <p>Here is my code</p>
  <pre><code>  $from = Carbon::parse($req-&gt;start_date_of_registration);
              $to = Carbon::parse($req-&gt;end_date_of_registration);
              $data = tbl_company::whereBetween(
                  &quot;date_of_registration&quot;,
                  [
                      $from,
                      $to
                  ]
              )
                  -&gt;paginate(100);
  </code></pre>