code: protected function bootstrap()
      {
          $request = $this->getRequest();
          Yii::setAlias('@webroot', dirname($request->getScriptFile()));
          Yii::setAlias('@web', $request->getBaseUrl());
  
          parent::bootstrap();
      }
docs: {@inheritdoc}