php - How do I turn the debug bar off in one view in Yii2? -


how turn debug bar off in yii2? tried

<?php use app\assets\appasset; define('yii_debug', false); appasset::register($this); $this->beginpage() ?> <!doctype html> 

but gave error constant yii_debug defined. don't want turn off whole app, view.

tried yii::$app->modules['debug'] = null; , got

php notice – yii\base\errorexception indirect modification of overloaded property yii\web\application::$modules has no effect

this executed, debug bar still shows.

$modules = yii::$app->modules; $module['debug'] = null;  yii::$app->setmodules($modules); 


Popular posts from this blog