Answer the question
In order to leave comments, you need to log in
How to add on beforeRequest to Yii2 config?
Hello! available:
Class CmsApplication extends Application
{
public function __construct($config=null){
parent::__construct($config);
}
'on beforeRequest' => function () {
Yii::$app->catchAll = [
'site/default/index',
'message' => 'сайт не доступен'
];
}
Answer the question
In order to leave comments, you need to log in
[
'modules'=>[],
'components'=>[],
'on beforeRequest' => function () {
Yii::$app->catchAll = [
'site/default/index',
'message' => 'сайт не доступен'
];
},
'params'=>[]
]
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question