Magento 2 Get Collection

[Solved] Magento 2 Get Collection | Php - Code Explorer | yomemimo.com
Question : magento 2 get collection

Answered by : agathoklis-tsiokos

$om = \Magento\Framework\App\ObjectManager::getInstance();
$productCollection = $om->create('Magento\Catalog\Model\ResourceModel\Product\Collection');
$collection = $productCollection->addAttributeToSelect('*')->load();

Source : | Last Update : Tue, 01 Sep 20

Answers related to magento 2 get collection

Code Explorer Popular Question For Php