You can use the two methods to get Magento 2 base URL:
1. Using Magento Core Method
2. Using Object Manager
Attachment 14179
Visit https://meetanshi.com/blog/get-magento-2-base-url/ for the detailed implementation of both the methods.
Printable View
You can use the two methods to get Magento 2 base URL:
1. Using Magento Core Method
2. Using Object Manager
Attachment 14179
Visit https://meetanshi.com/blog/get-magento-2-base-url/ for the detailed implementation of both the methods.
Thanks for such an informative post here