title: Adding a div row for a new row in Laravel
body: <p>I am beginner in Laravel. I make my project in Laravel 8.</p>
  <p>I have this code:</p>
  <pre><code>@foreach($productIngredients as $productIngredient)
  @php
      if($selectedProductIngredients-&gt;contains('ingredient_id', $productIngredient-&gt;id) === true){
          $item = \App\Models\SelectedProductIngredient::where('product_id', $product-&gt;id)-&gt;where('ingredient_id', $productIngredient-&gt;id)-&gt;first();
          $weight = $item-&gt;weight;
      } else {
          $weight = null;
      }
  @endphp
  
  &lt;div class=&quot;col-6&quot;&gt;
      &lt;div class=&quot;form-check py-2&quot;&gt;
          &lt;input id=&quot;productIngredientId-{{ $productIngredient-&gt;id }}&quot;
                 class=&quot;form-check-input enableInput&quot; style=&quot;margin-top:10px&quot;
                 name=&quot;productIngredient[]&quot; type=&quot;checkbox&quot;
                 value=&quot;{{ $productIngredient-&gt;id }}&quot;
                 @if($selectedProductIngredients-&gt;contains('ingredient_id', $productIngredient-&gt;id) === true) checked @endif&gt;
          &lt;label class=&quot;form-check-label&quot; for=&quot;flexCheckChecked&quot;&gt;
              {{ $productIngredient-&gt;name }} [{{ $productIngredient-&gt;short_name }}]
          &lt;/label&gt;
          &lt;input id=&quot;productIngredient-{{ $productIngredient-&gt;id }}&quot; type=&quot;text&quot;
                 name=&quot;productIngredient-{{ $productIngredient-&gt;id }}&quot; maxlength=&quot;10&quot;
                 class=&quot;form-control weight-input weightMask&quot;
                 style=&quot;width:100px;display: inline; margin-left:20px&quot; placeholder=&quot;&quot;
                 value=&quot;{{ $weight }}&quot;&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @endforeach
  </code></pre>
  <p>It's work fine.</p>
  <p>I would like there to be 2 records in 1 row.
  So I would like to add  at the beginning and close div in case of the last record </p>
  <p>How can I do this?</p>
  <p>Please help me.</p>