HEX
Server: LiteSpeed
System: Linux sv4.hami.host 5.14.0-611.54.3.el9_7.x86_64 #1 SMP PREEMPT_DYNAMIC Thu May 7 16:31:24 EDT 2026 x86_64
User: armgroup (1008)
PHP: 8.2.32
Disabled: show_source, system, shell_exec, passthru, exec, popen, proc_open, mail, socket_create, socket_create_listen, socket_create_pair, link, dl, openlog, syslog, stream_socket_server, curl_multi_init
Upload Files
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>