I want to display image from database to background-image css property inside carousel slider. But cannot make it work. Its blank.
My code:
<div class="ec-slide-item d-flex slide-10" style="background-image: url({{env('APP_URL')}}.'/'.{{$product->image}});">
The value of $product->image is ‘assets/images/dgfgsgs.jpg’.
The whole url is correct. But still not working. Help.
2
Answers
just try:
instead the variable $product->image should return a result like this: ‘images/dgfgsgs.jpg’
try this