i was reading a book magento2 tutorial. When learning how to create module. 2 augments was receiving in _construct function of controller.
Actually i am talking about this 2
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
how to know when which augment i have to use? i.e when working with product, order, customer. for example i saw that in other tutorial for get product list i have to use some like productfactory
Below is complete code for that controller
public function __construct(
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
$this->resultPageFactory = $resultPageFactory;
parent::__construct($context);
}