Yii2 params access within local config file in common directory
问题 I'm using Yii2 advanced template, I want to access params.php in main-local.php file, I called this ways: main-local.php: 'mailer' => [ 'class' => 'myClass', 'apikey' => \Yii::$app->params['mandrill_api_key'], 'viewPath' => '@common/mail', ], and I have stored this mandrill_api_key in params.php params.php: <?php return [ 'adminEmail' => 'admin@example.com', 'supportEmail' => 'support@example.com', 'user.passwordResetTokenExpire' => 3600, 'mandrill_api_key' => 'mykey' ]; I'm getting this