We will discuss the topic of how to create simple module called **Kyle Wiley **in Magento 2
There are 2 things must have when create Magento module: module.xml, registration.php
Step 1: Create the folder of Kyle Wiley module
app/code/Kyle/Wiley
So it's gonna be like Kyle_Wiley, Kyle_Wiley it's module name
Step 2: Create etc/module.xml file.
app/code/Kyle/Wiley/etc/module.xml
Content would be:
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
<module name="Kyle_Wiley">
</module>
</config>
Step 3: Create registration.php file
app/code/Kyle/Wiley/registration.xml
Content would be:
<?php
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Kyle_Wiley',
__DIR__
);
Step 4: Enable our new module
Finish the step 3, we have already created the Kyle_Wiley module. And we will enable this module in this step
After create the module if you run the command as:
bin/magento module:enable Kyle_Wiley
And for sure you should run
bin/magento setup:upgrade
Top comments (0)