Pages

Sunday, September 6, 2015

Magento 2: getBase url

Here is code for get Base URL in magento 2:
public function getBaseUrl()
{
return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA);
}

No comments:

Post a Comment