title: How to implement recursive query in laravel builder
body: <p>I have mysql database query and i want to implementing laravel query builder</p>
  <pre class="lang-sql prettyprint-override"><code>with recursive dates as (
      select date('2021-01-01') date
      union all
      select dates.date + interval 1 day from dates where dates.date &lt; '2021-01-31'
  )
  select dates.date, count(payments.id)
  from dates
  left join payments on date(payments.created)=dates.date
  group by 1;
  </code></pre>