@php
$product_images = [];
if ($product) {
// $product_images = [$product->image_one, $product->image_two, $product->image_three, $product->image_four, $product->image_five, $product->image_six];
$product_images = array(
array('image' => $product->image_one, 'tag' => $product->image_one_tag),
array('image' => $product->image_two, 'tag' => $product->image_two_tag),
array('image' => $product->image_three, 'tag' => $product->image_three_tag),
array('image' => $product->image_four, 'tag' => $product->image_four_tag),
array('image' => $product->image_five, 'tag' => $product->image_five_tag),
array('image' => $product->image_six, 'tag' => $product->image_six_tag),
);
$product_images = array_filter($product_images, fn($value) => $value !== null);
}
@endphp
{{-- @foreach ($product_images as $item)
![{{$item[image_one_tag]}}]({{ asset($item[image_one]) }})
@endforeach --}}
{{-- @php
$product_images = [$product->image_one, $product->image_two, $product->image_three, $product->image_four, $product->image_five, $product->image_six];
$product_images = array_filter($product_images, fn($value) => $value !== null);
@endphp --}}
@foreach ($product_images as $item)
{{--
 }})
--}}
![{{ $item['tag'] }}]({{ asset($item['image']) }})
@endforeach
@foreach ($product_images as $key => $image)
@endforeach
@if (isset($product->product_banner))
{{-- {!! $category->category_banner_text !!} --}}
 }})
@else
@endif