@extends('admin.layout') @section('title', 'Gesprek #' . $conversation->id) @section('content')
← Berichten
{{-- Header --}}
@foreach ([$conversation->userOne, $conversation->userTwo] as $u)

{{ $loop->first ? 'Gebruiker 1' : 'Gebruiker 2' }}

@if ($u) #{{ $u->id }} {{ $u->name }}

{{ $u->email }}

@else Verwijderd @endif
@endforeach

Berichten

{{ $messages->count() }}

Gestart

{{ $conversation->created_at->format('d/m/Y H:i') }}

{{-- Messages --}}

Berichten

@forelse ($messages as $msg) @php $isOne = $msg->sender_id === $conversation->user_one_id; @endphp
{{ mb_substr($msg->sender?->name ?? '?', 0, 1) }}
@if($msg->sender)#{{ $msg->sender_id }} @endif{{ $msg->sender?->name ?? 'Verwijderd' }} {{ $msg->created_at->format('d/m H:i') }} @if ($msg->read_at) ✓✓ @endif
@if ($msg->type === 'mood_change')

Stemming gewijzigd

@elseif ($msg->message)
{!! nl2br(e($msg->message)) !!}
@endif @if ($msg->attachment_name)

📎 {{ $msg->attachment_name }}

@endif
@empty
Geen berichten.
@endforelse
@endsection