this is my controller
<?php
namespace Prevaj\Orderswatches\Controller\Index;
class Index extends \Magento\Framework\App\Action\Action {
protected $_pageFactory;
/**
* Undocumented function
*
* @param \Magento\Framework\App\Action\Context $context
* @param \Magento\Framework\View\Result\PageFactory $pageFactory
* @return void
*/
public function __contruct(
\Magento\Framework\App\Action\Context $context,
\Magento\Framework\View\Result\PageFactory $pageFactory
){
$this->_pageFactory = $pageFactory;
return parent::__construct($context);
}
public function execute(){
return $this->_pageFactory->create();
}
}
this is the error im facing
Error: Call to a member function create() on null in /var/www/island.importers/app/code/Prevaj/Orderswatches/Controller/Index/Index.php:26 Stack trace: #0 /var/www/island.importers/vendor/magento/framework/Interception/Interceptor.php(58): Prevaj\Orderswatches\Controller\Index\Index->execute() #1 /var/www/island.importers/vendor/magento/framework/Interception/Interceptor.php(138): Prevaj\Orderswatches\Controller\Index\Index\Interceptor->___callParent() #2 /var/www/island.importers/vendor/magento/framework/App/Action/Plugin/ActionFlagNoDispatchPlugin.php(51): Prevaj\Orderswatches\Controller\Index\Index\Interceptor->Magento\Framework\Interception{closure}() #3 /var/www/island.importers/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Framework\App\Action\Plugin\ActionFlagNoDispatchPlugin->aroundExecute() #4 /var/www/island.importers/vendor/magento/framework/Interception/Interceptor.php(153): Prevaj\Orderswatches\Controller\Index\Index\Interceptor->Magento\Framework\Interception{closure}() #5 /var/www/island.importers/generated/code/Prevaj/Orderswatches/Controller/Index/Index/Interceptor.php(39):