I created a simple module, it is registered and shows up in
Stores -> Configuration -> Advanced -> Advanced
,
then I created routes.xml
and Display.php
.
app\code\Jurgis\Twilio_settings\etc\frontend\routes.xml
<?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 id="Jurgis" frontName="Twilio_settings">
<module name="Jurgis_Twilio_settings" />
</route>
</router>
</config>
app\code\Jurgis\Twilio_settings\Controller\Index\Display.php
<?php
namespace Jurgis\Twilio_settings\Controller\Index;
class Display extends \Magento\Framework\App\Action\Action
{
public function __construct(
\Magento\Framework\App\Action\Context $context)
{
return parent::__construct($context);
}
public function execute()
{
echo 'Hello World';
exit;
}
}
But when I go to: "http://localhost/magento2/Twilio_settings/index/display"
I get the 404 not found
error.
What have I done wrong?