@php $photos = json_decode(`+ feed.photo_path +`); if($photos) { $photo_count = count($photos); } @endphp @if($photos) @if(count($photos) > 0 && count($photos) < 2)
@elseif(count($photos) > 1 && count($photos) < 3) @elseif(count($photos) > 2 && count($photos) < 4) @elseif(count($photos) > 3 && count($photos) < 5) @elseif(count($photos) > 4) @php $n = 4; // to get the 4th image if the image count is greater than 3 @endphp