Yii 2 extension wrapper for console controllers.

Installs: 4 575

Dependents: 5

Watchers: 1

Type: yii-extension

v1.0.3 2014-07-24 05:13 UTC


Yii 2 extension wrapper for console controllers.


The preferred way to install this extension is through composer.

Either run

$ php composer.phar require webtoucher/yii2-commands "*"

or add

"webtoucher/yii2-commands": "*"

to the require section of your composer.json file.


Just use for your console controllers class webtoucher\commands\Controller instead of yii\console\Controller like this:


namespace app\components;

use webtoucher\commands\Controller;

class CommandController extends Controller
    public function actionRun()

You can run your command with flag --y to answer 'yes' for every confirms:

$ php yii command --y