-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
1.- cramos archivo routes.ml que apunta al controlador Test 2.- creamos controlador Test 3.- limpiamos cache php bin/magento cache:clean 4.- revisamos que el modulo este respondiendo con la siguiente URL magento2.local/helloworld/index/test 5.- OJO : helloworld es el id que se registro en el archivo routes
- Loading branch information
1 parent
38ff335
commit 106a361
Showing
2 changed files
with
26 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
<?php | ||
namespace Luisdev\Helloworld\Controller\Index; | ||
class Test extends \Magento\Framework\App\Action\Action | ||
{ | ||
protected $_pageFactory; | ||
public function __construct( | ||
\Magento\Framework\App\Action\Context $context, | ||
\Magento\Framework\View\Result\PageFactory $pageFactory) | ||
{ | ||
$this->_pageFactory = $pageFactory; | ||
return parent::__construct($context); | ||
} | ||
public function execute() | ||
{ | ||
echo "Hello world!"; | ||
exit; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" ?> | ||
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:App/etc/routes.xsd"> | ||
<router id="standard"> | ||
<route frontName="helloworld" id="helloworld"> | ||
<module name="Luisdev_Helloworld"/> | ||
</route> | ||
</router> | ||
</config> |