How To Create A module.xml File And registration.php File In Magento2.

 
How To Create A module.xml File And registration.php File In Magento2.

Let's start"

first of all open  PHP storm software and select App folder inside code folder then right click upper code folder and select file and write vendor name,module name and then inside module name to create a folder name like etc and inside etc folder to create a xml file like module.xml. one thing you also remember vendor and module name first litter is capital. you can create a xml file now you can go back to module name and right click upper module name and select file and create a php file like registration.php file.


Module.xml:

module.xml code is here:

<?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="Happy_Mood"/>
</config>

Registrattion.php:

registration.php code is here:

<?php
\Magento\Framework\Component\ComponentRegistrar::register(
    \Magento\Framework\Component\ComponentRegistrar::MODULE,
    'Happy_Mood',
    __DIR__
);

How To Create A module.xml File And registration.php File In Magento2. How To Create A module.xml File And registration.php File In Magento2. Reviewed by Technical on July 17, 2023 Rating: 5

No comments:

Powered by Blogger.