diff --git a/packages/Webkul/Shop/src/Http/Controllers/API/CategoryController.php b/packages/Webkul/Shop/src/Http/Controllers/API/CategoryController.php
index 1c25b653bcc..b30d7fbbad9 100755
--- a/packages/Webkul/Shop/src/Http/Controllers/API/CategoryController.php
+++ b/packages/Webkul/Shop/src/Http/Controllers/API/CategoryController.php
@@ -7,6 +7,7 @@
use Webkul\Category\Repositories\CategoryRepository;
use Webkul\Product\Repositories\ProductRepository;
use Webkul\Shop\Http\Resources\AttributeResource;
+use Webkul\Shop\Http\Resources\CategoryResource;
class CategoryController extends APIController
{
@@ -23,6 +24,19 @@ public function __construct(
) {
}
+ /**
+ * Get all categories.
+ */
+ public function index(): JsonResource
+ {
+ $categories = $this->categoryRepository
+ ->whereNotNull('parent_id')
+ ->where('status', 1)
+ ->paginate();
+
+ return CategoryResource::collection($categories);
+ }
+
/**
* Get filterable attributes for category.
*/
diff --git a/packages/Webkul/Shop/src/Http/Resources/CategoryResource.php b/packages/Webkul/Shop/src/Http/Resources/CategoryResource.php
new file mode 100644
index 00000000000..030716c8b9c
--- /dev/null
+++ b/packages/Webkul/Shop/src/Http/Resources/CategoryResource.php
@@ -0,0 +1,41 @@
+ $this->id,
+ 'parent_id' => $this->parent_id,
+ 'name' => $this->name,
+ 'slug' => $this->slug,
+ 'url_path' => $this->url_path,
+ 'status' => $this->status,
+ 'position' => $this->position,
+ 'display_mode' => $this->display_mode,
+ 'description' => $this->description,
+ 'images' => [
+ 'base_url' => $this->image_url,
+ 'banner_url' => $this->banner_url,
+ 'category_icon_url' => $this->category_icon_url,
+ ],
+ 'meta' => [
+ 'title' => $this->meta_title,
+ 'keywords' => $this->meta_keywords,
+ 'description' => $this->meta_description,
+ ],
+ 'translations' => $this->translations,
+ 'additional' => $this->additional,
+ ];
+ }
+}
diff --git a/packages/Webkul/Shop/src/Resources/views/components/categories/carousel.blade.php b/packages/Webkul/Shop/src/Resources/views/components/categories/carousel.blade.php
new file mode 100644
index 00000000000..022e45a07a4
--- /dev/null
+++ b/packages/Webkul/Shop/src/Resources/views/components/categories/carousel.blade.php
@@ -0,0 +1,114 @@
+