@php // The user's opening message, then the replies, oldest first. $thread = collect([['from_support' => false, 'name' => $ticket->user?->name, 'message' => $ticket->description, 'at' => $ticket->created_at]]) ->concat($ticket->replies->map(fn ($reply) => ['from_support' => $reply->sender instanceof \App\Models\Admin, 'name' => $reply->sender?->name, 'message' => $reply->message, 'at' => $reply->created_at])); @endphp
@foreach ($thread as $entry) @endforeach
@can('support_tickets.reply') @if ($ticket->status->isClosed())

{{ __('This ticket is closed. Reopen it to reply.') }}

@else
@csrf

{{ __('The user gets a push notification and sees the reply in the app.') }}

{{ __('Send reply') }}
@endif @endcan
@if ($ticket->ride) {{ __('View ride') }} @endif @can('support_tickets.assign')
@csrf @method('PUT') {{ __('Save') }}
@endcan @can('support_tickets.close')
@csrf @method('PUT')

{{ __('The user is notified when the ticket is resolved or closed. Closed tickets take no more replies.') }}

{{ __('Update status') }}
@endcan