5 votes
Accepted

Magento2 : Use of echo language construct is discouraged

You can use following instead of echo public function execute() { $data="bdfb"; $resultJson = $this->resultFactory->create(ResultFactory::TYPE_RAW); $resultJson->setContents($...
Qaisar Satti's user avatar
  • 32.5k

Only top scored, non community-wiki answers of a minimum length are eligible