Answers for "get base url in magento 2"

PHP
1

get base url in magento 2

$objectManager = \Magento\Framework\App\ObjectManager::getInstance();
$storeManager = $objectManager->get('\Magento\Store\Model\StoreManagerInterface');
$storeManager->getStore()->getBaseUrl();
Posted by: Guest on November-12-2020

Browse Popular Code Answers by Language