Answer the question
In order to leave comments, you need to log in
Can't figure out cron yii2?
I have yii2 basic
when I type php path / yii test / test in the console, I write unkown command: test / test I
tried to create a test controller in the controllers folder and created the console / controllers folder, it doesn’t work either way ...
As I understand it, that when you enter the php path / yii command, a list of controllers available through the console should appear, I have this picture:
And I can’t even imagine how to add test / test there ...
Answer the question
In order to leave comments, you need to log in
You need a controller that inherits from yii\console\Controller
in the advanced template, it is usually located in console\controllers, in basic in commands
and pay attention to your yii.php which you call, what application is going there, it should be:
$application = new yii \console\Application($config);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question