مشاهده تیکت: {{ $ticket->subject }}

{{-- نمایش مکالمات --}}
@foreach ($ticket->replies()->orderBy('created_at')->get() as $reply)

{{ $reply->user->name }} ({{ $reply->created_at->diffForHumans() }})

{{ $reply->message }}

{{-- ====================================================== --}} {{-- ====> کد هوشمند برای نمایش فایل ضمیمه <==== --}} {{-- ====================================================== --}} @php $attachmentPath = $reply->attachment_path; // اگر مسیر یک آرایه JSON بود، اولین عضو آن را استخراج کن if (is_string($attachmentPath) && ($decoded = json_decode($attachmentPath, true)) && is_array($decoded)) { $attachmentPath = $decoded[0] ?? null; } @endphp @if($attachmentPath) @endif {{-- ====================================================== --}}
@endforeach
{{-- فرم ارسال پاسخ جدید --}} @if ($ticket->status !== 'closed')

ارسال پاسخ جدید

@csrf
ارسال پاسخ
@else

این تیکت توسط ادمین بسته شده است.

@endif