Create a new directory named MyExtension in the app/code directory of your Magento installation.
In the MyExtension directory, create a new file named config.xml. This file will define our extension's configuration.
1.0.0
In the same MyExtension directory, create a new file named module.xml. This file will define the modules that our extension depends on.
Magento_Core
In the same MyExtension directory, create a new file named etc/module.xml. This file will define our extension's module declaration.
In the MyExtension directory, create a new directory named controllers. Inside this directory, create a new file named IndexController.php.
namespace MyExtension\Controller\Index;
class IndexController extends \Magento\Framework\App\Action\Action
{
public function execute()
{
// Your code here
echo "Hello World!";
exit;
}
}
In the same controllers directory, create a new file named index.php.
my_module/index
We love working with Small Businesses, Retailers, Manufacturers. Our team is here to Help.
→ Schedule Free Consultant Now