@php
$authId = auth()->id();
@endphp
@if ($messages)
@foreach ($messages as $key => $message)
sender_id === $authId)
class="sent"
@else
class="received"
@endif>
{{$message->message}}
@if ($message->sender_id === $authId)
Delete
@else
Delete
@endif
@endforeach
@endif