@extends('layouts.app') @section('content')

Manage Ticket #{{ $ticket->ticket_number }}

{{ $ticket->subject }}

{{ $ticket->category }}
@foreach($ticket->replies as $reply) @php // In Admin view: User messages on LEFT, Admin messages (ours) on RIGHT // But since multiple admins might exist, we check if reply user is Admin Role or specific user // Simpler: If reply->user_id == Auth::id() -> Right (It's ME) // If reply->user->isAdmin() -> Right (It's a Colleague) // Else (Customer) -> Left $isStaff = $reply->user->isAdmin(); @endphp
@if(!$isStaff)
{{ substr($reply->user->name, 0, 1) }}
@endif
{{ $reply->user->name }} {{ $isStaff ? '(Staff)' : '' }} • {{ $reply->created_at->format('M d, Y H:i A') }}

{{ $reply->message }}

@if($reply->attachment_path) @endif
@if($isStaff)
@endif
@endforeach

Post Staff Reply

@csrf
@csrf @method('PATCH')
{{ substr($ticket->user->name, 0, 1) }}
{{ $ticket->user->name }}
{{ $ticket->user->email }}

Recent Tickets

@if($ticket->user->tickets->count() > 1) @else

No other tickets.

@endif
@endsection @push('scripts') @endpush