I want to create a category collection which I can filter by its parent category id. How to do this?


Please use below code:

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$category = $objectManager ->create('Magento\Catalog\Model\ResourceModel\Category\Collection');

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.