title: Error in nesting Laravel Compnent inside livewire component
body: <p>I have a livewire component which consists of a list of products' cards, I tries to replace these cards with a Laravel component to edit it once in the future throughout the website
  but when I included it in the blade it throws an error even if the component's blade is empty</p>
  <blockquote>
  <p>syntax error, unexpected end of file, expecting &quot;elseif&quot; or &quot;else&quot; or &quot;endif&quot;</p>
  </blockquote>
  <p>I can't put my hand on the resume of that error</p>
  <p>here's the livewire blade</p>
  <pre><code>&lt;ul class=&quot;splide__list&quot;&gt;
  
                      @foreach ($section-&gt;offers-&gt;first()-&gt;finalProducts as $product)
                          {{-- Product : Start --}}
                          &lt;li class=&quot;splide__slide &quot;&gt;
                              &lt;div class=&quot;carousel-box w-full inline-block&quot;&gt;
                                  &lt;div
                                      class=&quot;group border border-light rounded hover:shadow-md hover:scale-105 mt-1 mb-2 transition&quot;&gt;
                                      &lt;div class=&quot;relative overflow-hidden&quot;&gt;
  
                                          {{-- Base Discount : Start --}}
                                          &lt;span
                                              class=&quot;absolute bg-white flex gap-1 top-2 ltr:left-0 rtl:right-0 flex justify-center items-center shadow p-1 ltr:rounded-r-full rtl:rounded-l-full text-primary text-sm font-bold&quot;&gt;
                                              &lt;span&gt;
                                                  {{ __('front/homePage.OFF') }}
                                              &lt;/span&gt;
                                              &lt;span class=&quot;flex items-center bg-primary text-white rounded-full p-1&quot;&gt;
                                                  {{ 100 - round(($product-&gt;final_price * 100) / $product-&gt;base_price, 0) }}%
                                              &lt;/span&gt;
                                          &lt;/span&gt;
                                          {{-- Base Discount : End --}}
  
                                          {{-- Product Image : Start --}}
                                          &lt;div class=&quot;block&quot;&gt;
                                              @if ($product-&gt;thumbnail)
                                                  &lt;img class=&quot;img-fit mx-auto h-full md:h-58 lazyloaded&quot;
                                                      src=&quot;{{ asset('storage/images/products/original/' . $product-&gt;thumbnail-&gt;file_name) }}&quot;&gt;
                                              @else
                                                  &lt;div class=&quot;flex justify-center items-center bg-gray-100&quot;&gt;
                                                      &lt;span class=&quot;block material-icons text-[240px]&quot;&gt;
                                                          construction
                                                      &lt;/span&gt;
                                                  &lt;/div&gt;
                                              @endif
                                          &lt;/div&gt;
                                          {{-- Product Image : End --}}
  
                                          {{-- Extra Discount : Start --}}
                                          @if ($product-&gt;final_price &gt; $product-&gt;best_price)
                                              &lt;span
                                                  class=&quot;absolute bottom-2 rtl:right-0 ltr:left-0 text-xs font-bold text-white px-2 py-1 bg-primary&quot;&gt;
                                                  {{ __('front/homePage.Extra Discount') }}
                                                  {{ round((($product-&gt;final_price - $product-&gt;best_price) * 100) / $product-&gt;final_price) }}%
                                              &lt;/span&gt;
                                          @endif
                                          {{-- Extra Discount : End --}}
  
                                          {{-- Add Product : Start --}}
                                          &lt;div
                                              class=&quot;absolute top-2 ltr:-right-10 rtl:-left-10 transition-all ease-in-out duration-500 ltr:group-hover:right-2 rtl:group-hover:left-2 flex flex-col gap-1&quot;&gt;
                                              {{-- todo --}}
                                              {{-- Add to wishlist : Start --}}
                                              &lt;a href=&quot;javascript:void(0)&quot; onclick=&quot;addToWishList(104)&quot;
                                                  data-toggle=&quot;tooltip&quot;
                                                  data-title=&quot;{{ __('front/homePage.Add to wishlist') }}&quot;
                                                  data-placement=&quot;left&quot;&gt;
                                                  &lt;span
                                                      class=&quot;material-icons bg-white text-lg p-1 rounded-full border border-light w-9 h-9 text-center shadow-sm&quot;&gt;
                                                      favorite_border
                                                  &lt;/span&gt;
                                              &lt;/a&gt;
                                              {{-- Add to wishlist : End --}}
  
                                              {{-- Add to compare : Start --}}
                                              &lt;a href=&quot;javascript:void(0)&quot; onclick=&quot;addToCompare(104)&quot;
                                                  data-toggle=&quot;tooltip&quot;
                                                  data-title=&quot;{{ __('front/homePage.Add to compare') }}&quot;
                                                  data-placement=&quot;left&quot;&gt;
                                                  &lt;span
                                                      class=&quot;material-icons bg-white text-lg p-1 rounded-full border border-light w-9 h-9 text-center shadow-sm&quot;&gt;
                                                      compare_arrows
                                                  &lt;/span&gt;
                                              &lt;/a&gt;
                                              {{-- Add to compare : End --}}
  
                                              {{-- Add to cart : Start --}}
                                              &lt;a href=&quot;javascript:void(0)&quot; onclick=&quot;showAddToCartModal(104)&quot;
                                                  data-toggle=&quot;tooltip&quot;
                                                  data-title=&quot;{{ __('front/homePage.Add to cart') }}&quot;
                                                  data-placement=&quot;left&quot;&gt;
                                                  &lt;span
                                                      class=&quot;material-icons text-lg p-1 rounded-full border border-light w-9 h-9 animate-pulse text-center shadow-sm bg-primary text-white hover:bg-secondary&quot;&gt;
                                                      shopping_cart
                                                  &lt;/span&gt;
                                              &lt;/a&gt;
                                              {{-- Add to cart : End --}}
                                          &lt;/div&gt;
                                          {{-- Add Product : End --}}
  
                                      &lt;/div&gt;
                                      &lt;div class=&quot;md:p-3 p-2 text-left&quot;&gt;
  
                                          {{-- Price : Start --}}
                                          &lt;div class=&quot;flex justify-center items-center gap-3&quot;&gt;
                                              @if ($product-&gt;under_reviewing)
                                                  &lt;span&gt;{{ __('admin/homepage.Under Reviewing') }}&lt;/span&gt;
                                              @else
                                                  {{-- Final Price : Start --}}
                                                  &lt;div class=&quot;flex rtl:flex-row-reverse gap-1&quot;&gt;
                                                      &lt;span
                                                          class=&quot;font-bold text-primary text-sm&quot;&gt;{{ __('front/homePage.EGP') }}&lt;/span&gt;
                                                      &lt;span
                                                          class=&quot;font-bold text-primary text-2xl&quot;&gt;{{ explode('.', $product-&gt;final_price)[0] }}&lt;/span&gt;
                                                      &lt;span
                                                          class=&quot;font-bold text-primary text-sm&quot;&gt;{{ explode('.', $product-&gt;final_price)[1] }}&lt;/span&gt;
                                                  &lt;/div&gt;
                                                  {{-- Final Price : End --}}
  
                                                  {{-- Base Price : Start --}}
                                                  &lt;del
                                                      class=&quot;flex rtl:flex-row-reverse gap-1 font-bold text-gray-400 text-sm&quot;&gt;
                                                      &lt;span&gt;
                                                          {{ __('front/homePage.EGP') }}
                                                      &lt;/span&gt;
                                                      &lt;span&gt;
                                                          {{ $product-&gt;base_price }}
                                                      &lt;/span&gt;
                                                  &lt;/del&gt;
                                                  {{-- Base Price : End --}}
                                              @endif
  
                                          &lt;/div&gt;
                                          {{-- Price : End --}}
  
                                          {{-- Free Shipping : Start --}}
                                          @if ($product-&gt;free_shipping)
                                              &lt;div class=&quot;text-center text-green-600 font-bold text-sm&quot;&gt;
                                                  {{ __('front/homePage.Free Shipping') }}
                                              &lt;/div&gt;
                                          @endif
                                          {{-- Free Shipping : End --}}
  
                                          {{-- Reviews : Start --}}
                                          {{-- todo --}}
                                          &lt;div class=&quot;my-1 text-center flex justify-center items-center gap-2&quot;&gt;
                                              &lt;div class=&quot;rating flex&quot;&gt;
                                                  &lt;span class=&quot;material-icons text-yellow-500 text-xl&quot;&gt;
                                                      star
                                                  &lt;/span&gt;
  
                                                  &lt;span class=&quot;material-icons text-yellow-500 text-xl&quot;&gt;
                                                      star
                                                  &lt;/span&gt;
  
                                                  &lt;span class=&quot;material-icons text-yellow-500 text-xl&quot;&gt;
                                                      star
                                                  &lt;/span&gt;
  
                                                  &lt;span class=&quot;material-icons text-yellow-500 text-xl&quot;&gt;
                                                      star_border
                                                  &lt;/span&gt;
  
                                                  &lt;span class=&quot;material-icons text-yellow-500 text-xl&quot;&gt;
                                                      star_border
                                                  &lt;/span&gt;
                                              &lt;/div&gt;
  
                                              &lt;span class=&quot;text-sm text-gray-600&quot;&gt;(100)&lt;/span&gt;
                                          &lt;/div&gt;
                                          {{-- Reviews : End --}}
  
                                          &lt;div class=&quot;flex flex-col gap-2&quot;&gt;
  
                                              {{-- Product Name : Start --}}
                                              &lt;h4 class=&quot;text-md m-0 text-center font-bold truncate&quot;&gt;
                                                  {{ $product-&gt;name }}
                                              &lt;/h4&gt;
                                              {{-- Product Name : End --}}
  
                                              {{-- Product Model : Start --}}
                                              &lt;h4 dir=&quot;ltr&quot; class=&quot;text-sm m-0 text-center text-gray-500 truncate&quot;&gt;
                                                  {{ $product-&gt;model }}
                                              &lt;/h4&gt;
                                              {{-- Product Model : End --}}
                                          &lt;/div&gt;
  
                                          {{-- Points : Start --}}
                                          @if ($product-&gt;points || $product-&gt;best_points)
                                              &lt;div
                                                  class=&quot;rounded px-2 mt-2 bg-gray-200 border-gray-800 text-black text-sm border flex justify-between items-center&quot;&gt;
                                                  &lt;span&gt;{{ __('front/homePage.Points') }}&lt;/span&gt;
                                                  &lt;span&gt;{{ $product-&gt;best_points &gt; $product-&gt;points ? round($product-&gt;best_points) : $product-&gt;points }}&lt;/span&gt;
                                              &lt;/div&gt;
                                          @endif
                                          {{-- Points : End --}}
  
                                      &lt;/div&gt;
                                  &lt;/div&gt;
                              &lt;/div&gt;
                          &lt;/li&gt;
                          {{-- Product : End --}}
                      @endforeach
                  &lt;/ul&gt;
  </code></pre>