这是我获取所有图像的代码
@foreach (explode('|', $product->images) as $image) <img style="width:100%" src="/storage/image/{{$image}}"> @endforeach
只有我想显示该数组中的第一张图像我该怎么做
@if (!empty($product->images))
@php
$images = explode('|', $product->images);
@endphp
@if (count($images) > 0)
<img style="width:100%" src="/storage/image/{{$images[0]}}">
@endif
@endif