Answer the question
In order to leave comments, you need to log in
How to connect dubug on advanced template?
I'm trying to connect the debug panel on the advanced template, browsing the Internet did not give anything except this one
if (YII_ENV_DEV) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug']['class'] = 'yii\debug\Module';
$config['modules']['debug']['allowedIPs'] = ['*'];
$config['bootstrap'][] = 'gii';
$config['modules']['gii']['class'] = 'yii\gii\Module';
$config['modules']['gii']['allowedIPs'] = ['*'];
}
if (!YII_ENV_TEST) {
// configuration adjustments for 'dev' environment
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
];
$config['modules']['debug']['allowedIPs'] = ['*'];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
$config['modules']['gii']['allowedIPs'] = ['*'];
}
Answer the question
In order to leave comments, you need to log in
When deploying advanced applications, you performed php init, where you chose the environment - dev or prod.
Debug and gii only work in the dev environment.
Open frontend/config/main.php and go to the very bottom of the file:
$config['bootstrap'][] = 'debug';
$config['modules']['debug'] = [
'class' => 'yii\debug\Module',
];
$config['bootstrap'][] = 'gii';
$config['modules']['gii'] = [
'class' => 'yii\gii\Module',
];
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question