title: Dynamic Carousel in Laravel not working displays only one image
body: <p>I'm trying to create a dynamic carousel in laravel but i see only one image. I have looking for solutions from many hours but still i'm stucked</p>
  
  <p>I have tried to change my code from this solution <a href="https://stackoverflow.com/questions/56246476/dynamic-carousel-in-php-laravel-only-shows-one-image?noredirect=1#comment99112079_56246476">Dynamic carousel in PHP Laravel only shows one image</a> but didn't work</p>
  
  <p>home.blade.php code</p>
  
  <pre><code>&lt;div id="myCarousel" class="carousel slide" data-ride="carousel"&gt;
  &lt;ol class="carousel-indicators"&gt;
  &lt;li data-target="#myCarousel" data-slide-to="0"     class="active"&gt;                                                                   &lt;/li&gt;
  &lt;/ol&gt;
  
  &lt;div class="carousel-inner" role="listbox"&gt;
  @foreach($sliders as $slider)
  &lt;div class="carousel-item active"&gt;
  &lt;img src="{{url('images', $slider-&gt;image)}}" class="d-block w-100"  alt="..."&gt; 
  &lt;/div&gt;
  @endforeach
  
  &lt;a class="carousel-control-prev" href="#myCarousel" role="button"  data-slide="prev"&gt;
  &lt;span class="carousel-control-prev-icon" aria-hidden="true"&gt;     &lt;/span&gt;
      &lt;span class="sr-only"&gt;Previous&lt;/span&gt;
  &lt;/a&gt;
  &lt;a class="carousel-control-next" href="#myCarousel" role="button" data-slide="next"&gt;
  &lt;span class="carousel-control-next-icon" aria-hidden="true"&gt;&lt;/span&gt;
  &lt;span class="sr-only"&gt;Next&lt;/span&gt;
  &lt;/a&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>master.blade.php code</p>
  
  <pre><code>&lt;!DOCTYPE html&gt;
  &lt;html lang="en"&gt;
  &lt;head&gt;
  &lt;meta charset="UTF-8"&gt;
  &lt;meta name="viewport" content="width=device-width, initial-  scale=1.0"&gt;
  &lt;meta http-equiv="X-UA-Compatible" content="ie=edge"&gt;
  &lt;link rel="icon" href="{{asset('favicon.ico')}}"&gt;
  &lt;title&gt;1233&lt;/title&gt;
  
  
  &lt;script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"   integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;script  src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"&gt;&lt;/script&gt;
  &lt;link rel="stylesheet"   href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.  css" integrity="sha384-  Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm"   crossorigin="anonymous"&gt;
  &lt;script     src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.  min.js" integrity="sha384-   ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q"        crossorigin="anonymous"&gt;&lt;/script&gt;
  
  &lt;/head&gt;
  &lt;body&gt;
  
  @include('front.nav')
  @yield('content')
  @include('front.footer')
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Any help will be appreciated.</p>