@if (isset($hval['user']->profile_image) && file_exists(public_path('storage/profile/' . $hval['user']->profile_image))) User Profile Image @else Default Profile Image @endif
{{ $hval['user']->user_name ?? '-' }}

Updated {{ \App\Helpers\TimeHelper::getRelativeTime($hval['createdat']) }}

@php $content = $hval['comment']; $dom = new DOMDocument(); @$dom->loadHTML(mb_convert_encoding($content, 'HTML-ENTITIES', 'UTF-8')); $imageLinks = []; foreach ($dom->getElementsByTagName('img') as $img) { $src = $img->getAttribute('src'); $dataFilename = $img->getAttribute('data-filename'); $imageName = $dataFilename ?: basename($src); $imageLinks[] = "
{$imageName}
"; $img->parentNode->removeChild($img); } $modifiedContent = $dom->saveHTML(); @endphp
{!! $modifiedContent !!}
@foreach ($imageLinks as $link) {!! $link !!} @endforeach