Support the ongoing development of Laravel.io →
Laravel Blade Views

Please help,

I have implemented the Bootstrap Carousel into my project but it doesn't seem to be sliding between items?!

                                        <div class="carousel-inner">
                                            @foreach($property->PropertyPhotos as $prophotos)
                                                @if($prophotos->property_id == $property->id)
                                                    <div style="display: none"><?= $photos = str_replace('public/', 'storage/', $prophotos->photo)?></div>
                                            @if($photos)
                                                {{$photos}}
                                            <div class="carousel-item active">
                                                @else
                                                    <div class="carousel-item ">
                                                        @endif
                                                <img class="card-img-top" src="{{asset($photos)}}" alt="First slide">
                                            </div>
                                                @endif
                                            @endforeach
                                        </div>
                                        <a class="carousel-control-prev" href="#carouselExampleControls" role="button" data-slide="prev">
                                            <span class="carousel-control-prev-icon" aria-hidden="true"></span>
                                            <span class="sr-only">Previous</span>
                                        </a>
                                        <a class="carousel-control-next" href="#carouselExampleControls" role="button" data-slide="next">
                                            <span class="carousel-control-next-icon" aria-hidden="true"></span>
                                            <span class="sr-only">Next</span>
                                        </a>
                                    </div>
Last updated 2 years ago.
0

Can anyone help me here please?

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.