Skip to content

ASolomatin/php-console-yii2

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

php-console-yii2

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');
}

About

PhpConsole wrapper for Yii 2

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • PHP 100.0%