mercredi 23 septembre 2020

Laravel blade Variable issues -> undefined index

I am facing some issues when passing a variable to my view with an image path.

When I trying to use this to get the image path

@foreach ($data as $dat)
<img class="img-responsive" src="" alt="">
@endforeach

I get this error

Undefined index: wp:featuredmedia (View: /Users/sam/Documents/development/shop/resources/views/landing-page.blade.php)

When I use only I get the correct path to the image without an error.

How can I fix this ?

Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire