File: //home/armgroup/libs/resources/views/livewire/account/ticket/create.blade.php
<div>
@include('layouts.errors')
<form role="form" wire:submit.prevent="store">
<div class="row">
<div class="form-group col-md-6">
<label for="priority">{{ __('Priority') }} *</label>
<select class="form-control form-select" id="priority" autofocus required wire:model.defer="priority">
@foreach(\App\Enums\TicketPriority::getInstances() as $enum)
<option value="{{ $enum->value }}">{{ $enum->description }}</option>
@endforeach
</select>
</div>
<div class="form-group col-md-6">
<label for="title">{{ __('Title') }} *</label>
<input type="text" class="form-control" required id="title" wire:model.defer="title">
</div>
</div>
<div class="row">
<div class="form-group col-md-12">
<label for="ticketMessage">{{ __('Message') }} *</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>
<button type="submit" class="btn btn-primary">{{ __('Save') }}</button>
<a href="{{ route('account.tickets.index') }}" class="btn btn-danger float-end">{{ __('Cancel') }}</a>
</form>
</div>