File: //home/armgroup/libs/resources/views/livewire/account/ticket/edit.blade.php
<div>
@include('layouts.errors')
<form role="form" wire:submit.prevent="update">
<div class="row">
<div class="form-group col-md-12">
<label for="ticketMessage">{{ __('Reply') }} *</label>
<textarea class="form-control" id="ticketMessage" required wire:model.defer="ticketMessage" rows="5"></textarea>
</div>
</div>
<table class="table table-hover mt-2">
<small class="text-muted">* {{ __('You can upload 5 files with doc, pdf, docx, zip, jpg, png, jpeg formats max 2 MB by clicking the Add attachment button.') }}</small>
<thead>
<tr>
<th>{{ __('File name') }} *</th>
<th>{{ __('File') }} *</th>
<th>{{ __('Actions') }}</th>
</tr>
</thead>
<tbody>
@if(count($items))
@foreach($items as $index => $item)
<tr>
<td>
<input type="text" class="form-control" wire:model.defer="items.{{$index}}.name" required>
</td>
<td>
<input type="file" class="form-control" wire:model.defer="items.{{$index}}.path" required>
</td>
<td>
<button type="button" class="btn btn-danger btn-sm" wire:click="removeItem({{ $index }})">
<span class="fa fa-trash"></span> {{ __('Delete') }}
</button>
</td>
</tr>
@endforeach
@endif
</tbody>
@if(count($items) < 5)
<tfoot>
<tr>
<td colspan="2"></td>
<td>
<button type="button" id="add-item" class="btn btn-success btn-sm" wire:click="addItem"><span class="fa fa-plus"></span> {{ __('Add attachment') }}</button>
</td>
</tr>
</tfoot>
@endif
</table>
</form>
<button class="btn btn-primary" wire:click="update">
{{ $ticket->status->is(\App\Enums\TicketStatus::CLOSED) ? __('Add reply and open ticket') : __('Add reply') }}
</button>
@unless($ticket->status->is(\App\Enums\TicketStatus::CLOSED))
<form class="d-inline" action="{{ route('account.tickets.update', $ticket->slug) }}" method="POST">
@csrf
@method('PATCH')
<button type="submit" class="btn btn-danger float-end" onclick="return confirm('{{ __('Are you sure?') }}');">{{ __('Close the ticket') }}</button>
</form>
@endunless
</div>