File: //home/armgroup/libs/resources/views/livewire/admin/attribute/edit.blade.php
<div>
<form id="form" role="form" wire:submit.prevent="update">
<div class="card-body">
<table class="table table-hover mt-4">
<thead>
<tr>
<th>مقدار</th>
<th>عملیات</th>
</tr>
</thead>
<tbody>
@if(count($values))
@foreach($values as $index => $value)
<tr>
<td>
<input type="text" class="form-control @error("values.$index.value") is-invalid @enderror" wire:model.defer="values.{{$index}}.value" required>
@error("values.$index.value")
<span class="text-danger" role="alert">
<strong>{{ $message }}</strong>
</span>
@enderror
</td>
<td>
<button type="button" class="btn btn-danger btn-sm" wire:click="removeItem({{ $index }})">
<span class="fa fa-trash"></span> حذف
</button>
</td>
</tr>
@endforeach
@endif
</tbody>
<tfoot>
<tr>
<td colspan="1"></td>
<td>
<button type="button" id="add-item" class="btn btn-success btn-sm" wire:click="addItem"><span class="fa fa-plus"></span> افزودن</button>
</td>
</tr>
</tfoot>
</table>
</div>
<div class="card-footer">
<button type="submit" class="btn btn-primary">ذخیره</button>
<a href="{{ route('admin.attribute-groups.show', $attributeGroupId) }}" class="btn btn-danger float-left">لغو</a>
</div>
</form>
</div>