with code in my blade
@foreach($gallery` as $galleries)
<img src="{{Voyager::image($galleries->gallery_images)}}" class="img-responsive img-thumbnail" />
@endforeach
It showed One broken Image
I dont understand it.
@foreach($gallery as $galleries)
Shouldn't that be vice versa?
$galleries->gallery_images
Seems to be an array, so you would to json_decode it, foreach through it, and then use it in an <img> tag
"Multiple images" stores it's value as a json-encoded array of paths. You need to json_decode the value from the database, then loop over the result, then display it with Voyager::image
@monazthapa you need to do next:
```
$images = json_decode($dataTypeContent->images);
if($images != null)
@foreach($images as $image)
@endforeach
@endif
````
This is now in our docs.
This should do it
@foreach ($galleries as $gallery)
@foreach (json_decode($gallery->gallery_images) as $image)
<img src="{{ Voyager::image($image)}}">
@endforeach
@endforeach
Please don't necro issues like this that have been closed for ~9 months.
When json decode then files shows broken image. Can anyone explain