What is the reason for the error that does not show the image in the carousel?

I am making a carousel and in the sitecontroller I have a query to the database to show me the images and store them in the variable $carousel and from there in the main index I have the carousel code and call the path where the images are stored when they are created in the crud.



In the view you only output string but not value.
your code: ‘img src="@web/carrusel-img"’

instead you should use there the value from the foreach loop
img src="@web/carrusel-img/" .$value