title: larave: how to remove slected data from foreach loop when count reach given value
body: <p><strong>Over view</strong></p>
  <p>am working with appointment booking system but time slots are open for all there are no limit for booking I want to hide/disable selected time slot when booking count reaches 25 for selected time slots</p>
  <p>here is my variable for use  foreach</p>
  <pre><code>@php
  $times = DB::table('times')
  -&gt;where('app_id', $app-&gt;id)
  -&gt;get();
  @endphp
  </code></pre>
  <p>and am foreach like this</p>
  <pre><code>@foreach ($times as $item)
  @php
  
  $blocktime = DB::table('bookings')-&gt;where('app_id',$app-&gt;id)
  -&gt;where('time',$item-&gt;time)
  -&gt;where('status',1)-&gt;get();
  @endphp
  
  &lt;div class=&quot;col-md-3&quot; style=&quot;padding-bottom: 10px;&quot;&gt;
                                              
  &lt;label class=&quot;btn btn-outline-primary&quot;&gt;
  &lt;input type=&quot;radio&quot; name=&quot;time&quot; value=&quot;{{ $item-&gt;time }}&quot;&gt;
  &lt;span&gt;{{ $item-&gt;time }}&lt;/span&gt;
  &lt;/label&gt;
  
  &lt;/div&gt;
  @endforeach
  </code></pre>
  <p>in this variable <code>$blocktime</code> i calculate how many booking is made for a selected time slot when</p>
  <pre><code>$blocktime  == 25 
  </code></pre>
  <p>when <code>$blocktime</code> count reaches 25 I want to disable that particular time slots how can I do that?</p>
  <p>Thank you for your valuable time</p>