Magento 2 Basic Commands.

Magento 2 comes with multiple Commands by default,

For Install Extension in magento 2, You must to run command for install extension.

Run below command for install new extension,

Where Packagename_Modulename is your Extension Package and module name.



How to set redirect url in Magento 2?

In Magento 2, You can redirect to any link or forcefully redirect to any link by Magento\Framework\Controller\Result\RedirectFactory object.

You can redirect from plugin or controller file to any link on the site by setPath() or setUrl() function.

Using setUrl($url) -> You need to pass link as parameter for redirect
Using setPath($path) -> You need to pass path(action URL) as parameter Continue reading “How to set redirect url in Magento 2?”