diff --git a/app/Http/Controllers/AdminController.php b/app/Http/Controllers/AdminController.php index 387cf93..7ad10e0 100644 --- a/app/Http/Controllers/AdminController.php +++ b/app/Http/Controllers/AdminController.php @@ -1,4 +1,5 @@ whereNull('parent_id')->paginate(10); + return view('userend.create-product', compact('mainParent')); } /** diff --git a/app/Http/Controllers/UserController.php b/app/Http/Controllers/UserController.php index 698799a..2282039 100644 --- a/app/Http/Controllers/UserController.php +++ b/app/Http/Controllers/UserController.php @@ -1,4 +1,5 @@ children as $child) @include('commonComponents.admin-category', ['category' => $child]) @endforeach -@endif - - +@endif \ No newline at end of file diff --git a/resources/views/userend/commonComponents/create-product-category.blade.php b/resources/views/userend/commonComponents/create-product-category.blade.php new file mode 100644 index 0000000..9573fb9 --- /dev/null +++ b/resources/views/userend/commonComponents/create-product-category.blade.php @@ -0,0 +1,8 @@ + + + +@if ($category->children->isNotEmpty()) + @foreach ($category->children as $child) + @include('userend.commonComponents.create-product-category', ['category' => $child]) + @endforeach +@endif \ No newline at end of file diff --git a/resources/views/userend/create-product.blade.php b/resources/views/userend/create-product.blade.php index 13cf5e6..c13e668 100644 --- a/resources/views/userend/create-product.blade.php +++ b/resources/views/userend/create-product.blade.php @@ -38,13 +38,24 @@