I want to get base URL with parameter in Yii2 eg
functionName("controller/action");
I want
domain.com/controller/action
The simple way is use the proper yii helpers for ruoting .. in this the yii\helpers\Url;
eg:
Url::to(['controller/action'], true);
see yii2 doc this https://www.yiiframework.com/doc/guide/2.0/en/runtime-routing