Dynamic Sliders Problem

Posted 3 years ago by david001

Iam not able to show images in slider one by one,it dispalys all images at once my static code is here and it works well ie slides images

 <!-- Wrapper for slides -->
              <div class="carousel-inner" role="listbox">
                <div class="item active">

                <img src="{{url('frontend/css/images/images/banner.jpg')}}" alt="..." style="width:100%;">
                </div>
                <div class="item">
                  <img src="{{url('frontend/css/images/images/banner.jpg')}}" alt="..." style="width:100%;">
                  
                </div>
                <h1>"We will be there when you need us most"</h1>
              </div>

When i made it dynamic it is not sliding images but displaying all images from database


  <div class="carousel-inner" role="listbox">
                <div class="item active">
 @for($i=0;$i<count($banners);$i++)
                 <img src="{{ $banners[$i]['image'] }} " alt="{{ $banners[$i]['title'] }}" title="{{ $banners[$i]['title'] }}" width="100%" />
                 @endfor
                </div></div>
<h2>{{$banners[$i]['title'] }}</h2>

how can i slides image one by one

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