diff --git a/framework/helpers/BaseUrl.php b/framework/helpers/BaseUrl.php index 2b5cfea536..4f740f76e2 100644 --- a/framework/helpers/BaseUrl.php +++ b/framework/helpers/BaseUrl.php @@ -378,7 +378,7 @@ class BaseUrl public static function current(array $params = [], $scheme = false) { $currentParams = Yii::$app->getRequest()->getQueryParams(); - $currentParams[0] = Yii::$app->controller->getRoute(); + $currentParams[0] = '/' . Yii::$app->controller->getRoute(); $route = ArrayHelper::merge($currentParams, $params); return static::toRoute($route, $scheme); }