I don't why my admin controller is not working, I have checked it and everything seems to be ok.
This is my code:
etc/adminhtml/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="admin">
<route id="testpakke" frontName="testpakke">
<module name="Company_Pakke" before="Magento_Backend" />
</route>
</router>
</config>
Controller/Adminhtml/Download/PDF.php
<?php
namespace Company\Pakke\Controller\Adminhtml\Download;
use Magento\Backend\App\Action;
class PDF extends Action
{
/**
* @var PageFactory
*/
protected $resultPageFactory;
/**
* @param Context $context
* @param PageFactory $resultPageFactory
*/
public function __construct(
\Magento\Backend\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $resultPageFactory
) {
parent::__construct($context);
$this->resultPageFactory = $resultPageFactory;
}
/**
* Index action
*
* @return \Magento\Backend\Model\View\Result\Page
*/
public function execute()
{
return $resultPage = $this->resultPageFactory->create();
}
}
when I type http://store/admin_1evvgb/testpakke/download or http://store/admin_1evvgb/testpakke/download/pdf or http://store/admin_1evvgb/testpakke/Adminhtml/download/pdf I get always the 404 error Page not found. Am I typing the path correctly?
Greetings!
menu.xml
code.