@extends('layouts.superadmin') @section('content')
Ticket #{{ $ticket->id }} - {{ $ticket->subject }}

User: {{ $ticket->user->name }} | Category: {{ optional($ticket->category)->name }} | Priority: {{ $ticket->priority }}

@csrf @method('PATCH')

{!! $ticket->description !!}

Posted {{ $ticket->created_at->diffForHumans() }}
@if($ticket->replies)

Reply

@foreach($ticket->replies as $reply) @php $first_letter = strtoupper(substr($reply->user_name ?? 'Guest', 0, 1)); @endphp @endforeach
@endif {{-- @foreach($ticket->replies as $reply)

{{ $reply->message }}

@if($reply->attachment) View Attachment @endif
{{ $reply->user->name }} ({{ $reply->user->is_admin ? 'Admin' : 'User' }}) replied {{ $reply->created_at->diffForHumans() }}
@endforeach --}}
@csrf
{{--
--}}
@endsection @section('script') @endsection