I want to filter category by store id. Used the following code, but it is not working.
$collection = $this->categoryCollectionFactory->create(); $collection->addAttributeToSelect('*') ->setStoreId(0);
catalogmagento2store-id
I want to filter category by store id. Used the following code, but it is not working.
$collection = $this->categoryCollectionFactory->create(); $collection->addAttributeToSelect('*') ->setStoreId(0);
Best Answer
Try below code. this is working for me.