Commit 73b7e03e by Alexander Makarov

Argument for Url::base is now optional

parent 2dacc4fb
......@@ -92,9 +92,13 @@ class BaseUrl
* @param string $url relative URL
* @return string absolute URL
*/
public function base($url)
public function base($url = null)
{
return Yii::$app->getRequest()->getBaseUrl() . '/' . $url;
$result = Yii::$app->getRequest()->getBaseUrl();
if ($url !== null) {
$result .= '/' . $url;
}
return $result;
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment