sumitgroup
3 months ago
370
4
Laravel

How to Solve Slider issue using Foreach in Laravel?

Posted 3 months ago by sumitgroup

I am working on a slider, everything is working fine but slider next and previous button not working. When i click on thumb images then it's also not working. Please let me know where i am mistaking.

Here are my slider view Code..

	       <div id="listingDetailsSlider" class="carousel listing-details-sliders slide mb-30">
            <h5 class="mb-4">{{$prop->title}} {{$prop->proLocation->locations}} {{$prop->proCity->name}}</h5>
            <div class="carousel-inner">
             <div class="active item carousel-item" data-slide-number="0">
              @forelse($prop->proImage as $sliderimage)
              <img src="{{asset('property_img/'. $sliderimage->large_thumb_url.'/'. $sliderimage->large_thumb)}}" class="img-fluid" alt="slider-listing" style="width: 965px; height: 500px;">
              @empty
              @endforelse
            </div>
            <a class="carousel-control left" href="#listingDetailsSlider" data-slide="prev"><i class="fa fa-angle-left"></i></a>
            <a class="carousel-control right" href="#listingDetailsSlider" data-slide="next"><i class="fa fa-angle-right"></i></a>
          </div>
          
          <!-- main slider carousel nav controls -->
          <ul class="carousel-indicators smail-listing list-inline nav nav-justified">
            @forelse($prop->proImage as $sliderimage)
            <li class="list-inline-item active">
              <a id="carousel-selector-0 {{ $loop->first ? 'active' : '' }}" class="selected" data-slide-to="0" data-target="#listingDetailsSlider">
                <img src="{{asset('property_img/'. $sliderimage->small_thumb_url.'/'. $sliderimage->small_thumb)}}" class="img-fluid" alt="listing-small" style="width: 127px; height: 85px;">
              </a>
            </li>
            @empty
            @endforelse
          </ul>
          <!-- main slider carousel items -->
        </div>

Please sign in or create an account to participate in this conversation.