@extends('driver.layout') @section('title','Support History') @section('content')
{{-- HEADER --}}

Support History

View past support tickets and replies

{{-- CARD --}}
@if($tickets->isEmpty())

No ticket history available

@else
@foreach($tickets as $ticket) {{-- ID --}} {{-- SUBJECT --}} {{-- PRIORITY --}} {{-- STATUS --}} {{-- LAST REPLY --}} {{-- VIEW --}} @endforeach
# Subject Priority Status Last Reply View
#{{ $ticket->id }}
{{ $ticket->subject }}
{{ $ticket->created_at->format('d M Y') }}
@if($ticket->priority === 'emergency') Emergency @elseif($ticket->priority === 'high') High @else Low @endif {{ ucfirst($ticket->status) }} {{ optional($ticket->replies->last())->created_at ? $ticket->replies->last()->created_at->diffForHumans() : '—' }} View
@endif
@endsection