There is a component configstr that reads from the database the parameters registered in the web.php config
'configstr' => [ 'class' => 'app\components\Configstr', ], How can I create a global component instance so that each time I do not call it like this:
Yii::$app->configstr->second_s in this case, it is re-initialized and reads the database again, if you set $ cls_config = new configstr (); then everything is fine once the parameters are loaded from the database. How to make a global instance and where should it be specified?