yii - Can you run console jobs from yii2-basic? -
i aware yii2-advanced has ability run console jobs (php yii controllername) wondering if basic app has same ability? notice console.php file in config folder, cannot seem jobs run.
if possible, can give example - controller go (since put in controllers, message 'error: unknown command test' when trying php yii test)
any appreciated.
yes, same functionality exists in basic template too.
however, it's organized bit differently.
by default console controllers located in commands folder (you can change editing setting: 'controllernamespace' => 'app\commands'
).
configuration managed through config/console.php
mentioned.
as example can take @ hellocontroller comes template default.
you can find more info in according official docs section.
as error, accurately check controller name , action names, problem there.
update: make sure have @ least 1 action in controller, otherwise same error ("unknown command") appear.
you can list available commands php yii
command.
Comments
Post a Comment