diff --git a/app/Http/Controllers/admin/product/ProductCategoryController.php b/app/Http/Controllers/admin/product/ProductCategoryController.php index 7a5fd30..a75f01a 100644 --- a/app/Http/Controllers/admin/product/ProductCategoryController.php +++ b/app/Http/Controllers/admin/product/ProductCategoryController.php @@ -123,7 +123,13 @@ class ProductCategoryController extends Controller return '
'; } ) - ->rawColumns(['details_control', 'action', 'is_active', 'checkbox']) + ->addColumn( + 'sub_group_html', + function ($d) { + return view('administrator.pages.product.categories.datatable.sub_group', ['children' => $d->children])->render(); + } + ) + ->rawColumns(['details_control', 'action', 'is_active', 'checkbox', 'sub_group_html']) ->make(true); } } \ No newline at end of file diff --git a/resources/views/administrator/pages/product/categories/datatable/sub_group.blade.php b/resources/views/administrator/pages/product/categories/datatable/sub_group.blade.php new file mode 100644 index 0000000..7c3658c --- /dev/null +++ b/resources/views/administrator/pages/product/categories/datatable/sub_group.blade.php @@ -0,0 +1,41 @@ +@php + use App\Enums\Status; +@endphp + + +@if($children->isNotEmpty()) +| Group | +Slug | +Status | +Action | +
|---|---|---|---|
| {{ $child->name }} | +{{ $child->slug }} | +
+ |
+
+
+
+
+
+
+ |
+
| Group | Slug | Status | Action |
|---|---|---|---|
| ' + child.name + ' | ' + - '' + child.slug + ' | ' + - '' + statusBadge + ' | ' + - '' + actionButtons + ' | ' + - '