I want to use a custom helper in a custom command. From :
https://book.cakephp.org/4/en/console-commands/input-output.html#command-helpers
it appears I need to :
- create my helper in src/command/helper instead of view//helper
- Call it with :
$this->helper(‘MyHelper’)->someFunction(“test”);
However when I do this I get:
Call to undefined method App\Command\myCommand::helper()
Did I misunderstand something? It seems that helper is not defined?
Thanks!