You can get the base URL of the store in the controller file using Store Manager Interface.
To Retrieve the Base URL of the current store, You need to instantiate constructor in your controller file,
Check below code snippet for getting base URL, Continue reading “Get Base Url in Model or Plugin file Magento 2.”