I'm trying to set an alias
in Yii2
but I'm getting a Invalid Parameter / Invalid path alias
for the below code that is placed in the app config file:
'aliases' => [
// Set the editor language dir
'@editor_lang_dir' => '@webroot/scripts/sceditor/languages/',
],
If I remove the @
it works.
I noticed you can do this:
Yii::setAlias('@foobar', '@foo/bar');
...but I would prefer to set it within the app config file. Is this not possible? If so, how?
See Question&Answers more detail:os