I have tried to get all the stores in Magento 2.
$stores = $this->storeManager->getStores();
$ids= array();
foreach ($stores as $storeId => $storeData) {
$ids[] = $storeId;
}
print_r($ids);
output returns 1
.
But in DB it has two store codes "admin" and "default":
How do I get both stores ids?