webtoucher / yii2-commands
Yii 2 extension wrapper for console controllers.
Installs: 178 970
Dependents: 7
Suggesters: 0
Security: 0
Stars: 1
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii-extension
Requires
- php: >=5.3.0
This package is auto-updated.
Last update: 2024-12-14 21:54:28 UTC
README
Yii 2 extension wrapper for console controllers.
Installation
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.
Usage
Just use for your console controllers class webtoucher\commands\Controller
instead of yii\console\Controller
like this:
<?php 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