@include('admin.crud.form', [ 'action' => route('admin.categories.update', $edit_data->id), 'method' => 'PUT', 'formId' => 'edit-category-form', 'submitText' => 'Update Category', 'class' => 'ajax-crud-form', 'redirect' => route('admin.categories.index'), 'fields' => [ [ 'type' => 'text', 'name' => 'title', 'id' => 'title', 'label' => 'Title', 'placeholder' => 'Enter Category Title', 'required' => true, 'value' => old('title', $edit_data->title), 'col' => 6 ], [ 'type' => 'text', 'name' => 'slug', 'id' => 'slug', 'label' => 'Slug', 'placeholder' => 'Enter Category Slug', 'required' => true, 'value' => old('slug', $edit_data->slug), 'col' => 6 ], [ 'type' => 'select2', 'name' => 'parent_id', 'id' => 'parent_id', 'label' => 'Parent Category', 'options' => $parentCategories ?? [], 'value' => old('parent_id', $edit_data->parent_id), 'col' => 6 ], [ 'type' => 'select', 'name' => 'status', 'id' => 'status', 'label' => 'Status', 'required' => true, 'options' => ['active' => 'Active', 'inactive' => 'Inactive'], 'value' => old('status', $edit_data->status), 'col' => 6 ], [ 'type' => 'textarea', 'name' => 'description', 'id' => 'description', 'label' => 'Description', 'placeholder' => 'Enter Category Description', 'value' => old('description', $edit_data->description), 'col' => 12 ], [ 'type' => 'image', 'name' => 'thumbnail', 'label' => 'Thumbnail', 'presetKey' => 'categories_thumbnail', 'value' => is_array($edit_data->thumbnail) ? ($edit_data->thumbnail_url['thumb']) : '', 'circle' => true, 'col' => 12 ] ] ])