asolomatin / php-console-yii2
PhpConsole wrapper for Yii2
Installs: 1 383
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 4
pkg:composer/asolomatin/php-console-yii2
Requires
- php: >=5.3.0
- php-console/php-console: 3.*
This package is auto-updated.
Last update: 2025-10-18 10:47:08 UTC
README
PhpConsole wrapper for Yii 2
Based on https://github.com/barbushin/php-console-yii
Configuration Example
Into common/main.php 'components' => [ 'phpconsole' => [ 'class' => '\nilsburg\PhpConsole\PhpConsole', 'isEvalEnabled' => true, 'password' => 'some_password' ], ]
Usage (Eval)
public function beforeAction($action)
{
if ($action->id === 'index') {
$this->enableCsrfValidation = false;
}
return parent::beforeAction($action);
}
public function actionIndex()
{
$console = \Yii::$app->phpconsole;
unset($console);
return $this->render('index');
}