title: laravel 5.6 start time end time duration
body: <p>I am trying to make a function in Laravel 5.6</p>
  
  <p>I have a <code>$start_time</code>, <code>$end_time</code> and <code>$duration</code> variables.</p>
  
  <p>I would like to get time slots from the start time until end time, in <code>$duration</code> periods, for example:</p>
  
  <pre><code>$duration = 30 min     
  $start_time = 9:00 am
  $end_time = 9:00 pm
  </code></pre>
  
  <hr>
  
  <p>Results: </p>
  
  <blockquote>
    <p>-9:00 - 9:30<br>
    -9:30 - 10:00<br>
    -10:00 - 10:30<br>
    .... etc</p>
  </blockquote>
  
  <p>Also, I would like to not show the slot where time overlaps with appointments in my database.</p>