Advertisement
Cakrawala

Corousel

Aug 8th, 2020
100
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.52 KB | None | 0 0
  1. <h5 class="card-title">{{ $product['name'] }}</h5>
  2.         @php
  3.             $img = explode('|',$product->image);
  4.         @endphp
  5.         <div id="carouselExampleCaptions" class="carousel slide" data-ride="carousel">
  6.           <ol class="carousel-indicators">
  7.             @foreach ($img as $item => $images)            
  8.             <li data-target="#carouselExampleCaptions" data-slide-to="{{ $images }}" class="{{ $loop->first ? 'active' : '' }}"></li>
  9.             @endforeach
  10.           </ol>
  11.           <div class="carousel-inner">
  12.             @foreach ($img as $item => $images)
  13.                
  14.             <div class="carousel-item">
  15.               <img src="{{'./image/'. $images }}" class="d-block w-100" alt="...">
  16.               <div class="carousel-caption d-none d-md-block">
  17.                 <h5>Second slide label</h5>
  18.                 <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
  19.               </div>
  20.             </div>    
  21.             @endforeach
  22.  
  23.           </div>
  24.  
  25.           <a class="carousel-control-prev" href="#carouselExampleCaptions" role="button" data-slide="prev">
  26.             <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  27.             <span class="sr-only">Previous</span>
  28.           </a>
  29.           <a class="carousel-control-next" href="#carouselExampleCaptions" role="button" data-slide="next">
  30.             <span class="carousel-control-next-icon" aria-hidden="true"></span>
  31.             <span class="sr-only">Next</span>
  32.           </a>
  33.          
  34.  
  35.         </div>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement