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/author/edit.blade.php
<form role="form" wire:submit.prevent="update">
    <div class="card-body">
        <div class="row">
            <div class="col-6">
                <div class="form-group">
                    <label for="name">نام *</label>
                    <input class="form-control @error('author.name') is-invalid @enderror" id="name"
                           wire:model.defer="author.name" type="text" required>
                    @error('author.name')
                        <span class="text-danger" role="alert">
                            <strong>{{ $message }}</strong>
                        </span>
                    @enderror
                </div>
            </div>
            <div class="col-6">
                <div class="form-group">
                    <label for="slug">اسلاگ *</label>
                    <input class="form-control @error('author.slug') is-invalid @enderror" id="slug"
                           wire:model.defer="author.slug" type="text" required>
                    @error('author.slug')
                        <span class="text-danger" role="alert">
                            <strong>{{ $message }}</strong>
                        </span>
                    @enderror
                </div>
            </div>
            <div class="col-6">
                <div class="form-group">
                    <label for="h1">تگ h1</label>
                    <input class="form-control @error('author.h1') is-invalid @enderror" id="h1"
                           wire:model.defer="author.h1" type="text">
                    @error('author.h1')
                    <span class="text-danger" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                    @enderror
                </div>
            </div>
            <div class="col-6">
                <div class="form-group">
                    <label for="meta_title">عنوان صفحه</label>
                    <input class="form-control @error('author.meta_title') is-invalid @enderror" id="meta_title"
                           wire:model.defer="author.meta_title" type="text">
                    @error('author.meta_title')
                    <span class="text-danger" role="alert">
                                <strong>{{ $message }}</strong>
                            </span>
                    @enderror
                </div>
            </div>
            <div class="col-6">
                <div class="form-group">
                    <label for="sort_order">ترتیب نمایش</label>
                    <input class="form-control @error('author.sort_order') is-invalid @enderror" id="sort_order"
                           wire:model.defer="author.sort_order" type="number" dir="ltr">
                    @error('author.sort_order')
                    <span class="text-danger" role="alert">
                            <strong>{{ $message }}</strong>
                        </span>
                    @enderror
                </div>
            </div>
            <div class="col-12">
                <div class="form-group">
                    <div class="input-group d-inline col-md-2">
                        <span class="input-group-btn">
                           <a data-input="thumbnail" data-preview="holder" id="lfm" class="btn btn-primary text-white">
                              <i class="fa fa-picture-o"></i> لوگو
                           </a>
                        </span>
                    </div>
                    <div id="holder" class="d-inline col-md-4">
                        @if($author->image)
                            <a href="{{ asset($author->image) }}" target="_blank">
                                <img src="{{ asset($author->image) }}" style="width: 120px; height: 90px;" class="img-fluid">
                            </a>
                            <a href="#" class="btn btn-sm btn-danger" wire:click.prevent="$set('author.image', null)"><span class="fa fa-times"></span> حذف</a>
                        @endif
                    </div>
                </div>
            </div>
            <div class="col-12">
                <div class="form-group">
                    <label for="short_description">توضیحات کوتاه</label>
                    <textarea class="form-control @error('author.short_description') is-invalid @enderror" id="short_description"
                              wire:model.defer="author.short_description"></textarea>
                    @error('author.short_description')
                    <span class="text-danger" role="alert">
                        <strong>{{ $message }}</strong>
                    </span>
                    @enderror
                </div>
            </div>
            <div class="col-12 mb-3">
                <div class="form-group mb-0" wire:ignore>
                    <label for="description">توضیحات تکمیلی</label>
                    <textarea class="tinymce form-control @error('author.description') is-invalid @enderror" id="description"
                              wire:model.defer="author.description"></textarea>
                </div>
                @error('author.description')
                    <span class="text-danger" role="alert">
                        <strong>{{ $message }}</strong>
                    </span>
                @enderror
            </div>
            <div class="col-12">
                <table class="table table-hover">
                    <thead>
                    <tr>
                        <th>سوال</th>
                        <th>جواب</th>
                        <th>عملیات</th>
                    </tr>
                    </thead>
                    <tbody>
                    @foreach($faq as $index => $f)
                        <tr>
                            <td>
                                <input type="text" class="form-control @error("faq.$index.question") is-invalid @enderror"
                                       wire:model.defer="faq.{{$index}}.question" required>
                                @error("faq.$index.question")
                                <span class="text-danger" role="alert">
                                            <strong>{{ $message }}</strong>
                                        </span>
                                @enderror
                            </td>
                            <td>
                                <input type="text" class="form-control @error("faq.$index.answer") is-invalid @enderror"
                                       wire:model.defer="faq.{{$index}}.answer" required>
                                @error("faq.$index.answer")
                                <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
                    </tbody>
                    <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> افزودن</button>
                        </td>
                    </tr>
                    </tfoot>
                </table>
            </div>
        </div>
    </div>
    <div class="card-footer">
        <button type="submit" class="btn btn-primary">ذخیره</button>
        <a href="{{ route('admin.authors.index') }}" class="btn btn-danger float-left">لغو</a>
    </div>
</form>

@push('scripts')
    @include('livewire.admin.partials.lfm')
    @include('livewire.admin.partials.tinymce', ['variable' => 'author.description'])
@endpush