You can use the two methods to get Magento 2 base URL:
- Using Magento Core Method
- Using Object Manager
Visit https://meetanshi.com/blog/get-magento-2-base-url/ for the detailed implementation of both the methods.<.b>
You can use the two methods to get Magento 2 base URL: