@foreach ($messages as $mess) @if ($currentUserId != $mess->user_id)
@php echo mb_substr($username, 0, 1, 'UTF-8') @endphp
{{--
{!! $mess->created_at->format('h:i | M d Y'); !!}
--}}

{{ htmlspecialchars(strip_tags($username), ENT_QUOTES, 'UTF-8') }}

{{ htmlspecialchars(strip_tags($mess->created_at->format('l, M d Y g:i A')), ENT_QUOTES, 'UTF-8') }}

{{ htmlspecialchars(strip_tags(nl2br($mess->message)), ENT_QUOTES, 'UTF-8') }}

@if (isset($mess->attachment_id))

{{ htmlspecialchars(strip_tags($mess->attachment_name), ENT_QUOTES, 'UTF-8') }}

@endif
@else

{{ htmlspecialchars(strip_tags($currentUser->username), ENT_QUOTES, 'UTF-8') }}

{{ htmlspecialchars(strip_tags($mess->created_at->format('l, M d Y g:i A')), ENT_QUOTES, 'UTF-8') }}

{{ htmlspecialchars(strip_tags(nl2br($mess->message)), ENT_QUOTES, 'UTF-8') }}

@if (isset($mess->attachment_id)) @endif
@php echo mb_substr($currentUser->username, 0, 1, 'UTF-8') @endphp
@endif @endforeach
@if ($currentUserId == $user_one || $currentUserId == $user_two)
{{-- --}}
@endif