i have a product table, where there is a multi images field, i insert a product with these images by laravel voyager, i try to display these images of a product but too bad it doesn't work.
<ul class="hide-bullets">
@if ($products->images)
@foreach (json_decode($products->images, true) as $images)
<li class="col-sm-3">
<a class="thumbnail" id="carousel-selector-16">
<img src="{{ asset('storage/'.$products->images) }}">
</a>
</li>
@endforeach
@endif
</ul>
Check here about helper method to display images.
@foreach($posts as $post)
$images = json_decode($post->images);
@foreach($images as $image)
<img src="{{ Voyager::image($post->getThumbnail($image, 'small')) }}" />
@endforeach
@endforeach
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.