I’m trying to write a simple cron console controller based on some samples I found.
This is my controller code:
namespace console\controllers;
use Yii;
use yii\console\Controller;
class CronController extends Controller
{
public function actionIndex()
{
echo "hello";
}
}
any other suggestion ? I’m struggling with this issue for few days already and it seems like a very basic functionality that should work.
digging into the code it seems the yii looks for controller only under yiisoft/yii2/console/controllers/ so when I put my controller there it works, but I assume it should know to find it also under console/controller, obviously I don’t want to put my controller inside yii internal folder.
not sure if this is the proper solution and if there’s another way to make it works, but I already spent a lot of time on it so I guess I’ll keep it like that for now.