@if ($mediaImageVideoTotal == 1) @foreach ($mediaImageVideo as $media) @if ($media->image != '') @php $urlImg = $media->img_type == 'gif' ? Helper::getFile(config('path.images').$media->image) : url("files/storage", $response->id).'/'.$media->image; @endphp width ? 'width="'. $media->width .'"' : null !!} {!! $media->height ? 'height="'. $media->height .'"' : null !!} data-src="{{$urlImg}}?w=960&h=980" class="img-fluid lazyload d-inline-block w-100 post-image" alt="{{ e($response->description) }}"> @endif @if ($media->video != '') @endif @endforeach @endif @if ($mediaImageVideoTotal >= 2)
@foreach ($mediaImageVideo as $media) @php if ($media->type == 'video') { $urlMedia = Helper::getFile(config('path.videos').$media->video); $videoPoster = $media->video_poster ? Helper::getFile(config('path.videos').$media->video_poster) : false; } else { $urlMedia = $media->img_type == 'gif' ? Helper::getFile(config('path.images').$media->image) : url("files/storage", $response->id).'/'.$media->image; $videoPoster = null; } $nth++; @endphp @if ($media->type == 'image' || $media->type == 'video') @if ($nth == 5 && $mediaImageVideoTotal > 5)

+{{ $mediaImageVideoTotal - 5 }}

@endif @if ($media->type == 'video') @endif @if (! $videoPoster && $media->type == 'video') @endif @if ($videoPoster) width ? 'width="'. $media->width .'"' : null !!} {!! $media->height ? 'height="'. $media->height .'"' : null !!} class="post-img-grid"> @endif
@endif @endforeach
@endif