@extends('frontend.layouts.app') @section('title', ($other?->name ?? 'Mesaj') . ' — Animexe') @push('styles') @endpush @section('content') @php $me = auth()->user(); @endphp
{{-- Header --}}
@if($other?->avatar) {{ $other->name }} @else {{ mb_strtoupper(mb_substr($other?->name ?? '?', 0, 1)) }} @endif
{{ $other?->name ?? 'Silinmiş Kullanıcı' }}
@if($other?->username)
@php echo '@' . e($other->username); @endphp
@endif
@if($other) {{-- Sesli arama --}} {{-- Profil --}} @endif
{{-- Messages --}}
@if($messages->isEmpty())

Henüz mesaj yok. İlk mesajı sen gönder!

@else @php $lastDate = null; @endphp @foreach($messages as $msg) @php $msgDate = $msg->created_at->toDateString(); $isMine = $msg->user_id === $me->id; @endphp @if($msgDate !== $lastDate)
{{ $msg->created_at->translatedFormat('d F Y') }}
@php $lastDate = $msgDate; @endphp @endif
@if(!$isMine)
@if($msg->user?->avatar) @else{{ mb_strtoupper(mb_substr($msg->user?->name ?? '?', 0, 1)) }}@endif
@endif
@if(str_starts_with($msg->body, 'ANIMESHARE::')) @php try { $sd = json_decode(substr($msg->body,12),true); } catch(\Throwable $e){ $sd=null; } @endphp @if($sd) @else
{{ $msg->body }}
@endif @elseif(str_starts_with($msg->body, 'IMAGE::')) Resim @elseif(str_starts_with($msg->body, 'GIF::')) GIF @else
{{ $msg->body }}
@endif
{{ $msg->created_at->format('H:i') }}
@endforeach @endif
{{-- Footer --}}
@endsection @push('scripts') @endpush