Skip to content

Create Magento 2 Module (Controller) Part II

here step how to working with controller, i will create 2 controllers file, my objective is, to run following url   and

  1. create file app\code\Ansyori\HelloWorld\etc\frontend\routes.xml
  2. next, create file app\code\Ansyori\HelloWorld\Controller\Index\Index.php
  3. and app\code\Ansyori\HelloWorld\Controller\Index\Test.php
  4. dont forget, clear magento cache!
  5. then try open both URLs on your browser :



Comments are closed.