Getting below error -
Recoverable Error: Argument 1 passed to namespace\Modulename\Controller\Adminhtml\Blacklist\Index::__construct() must be an instance of Magento\Backend\App\Action\Context, instance of Magento\Framework\ObjectManager\ObjectManager given, called in /home/mage2demo/public_html/mage21new/vendor/magento/framework/ObjectManager/Factory/AbstractFactory.php on line 93 and defined in /home/mage2demo/public_html/mage21new/app/code/Namespace\Modulename/Controller/Adminhtml/Blacklist/index.php on line 13
here is the code -
namespace Mynamespace\Modulename\Controller\Adminhtml\ModuleDirectoryname;
use \Magento\Backend\App\Action;
use \Magento\Backend\App\Action\Context;
class Index extends Action
{
protected $helper;
protected $context;
public function __construct(
Context $context,
\VT\Blacklist\Helper\Data $helper
) {
$this->viewHelper = $viewHelper;
parent::__construct($context);
}
public function execute()
{
echo "hello"; die;
}
}
namespace\Modulename\Controller\Adminhtml\Blacklist\Index.php
please ?