Magento 2

Magento2 get admin url

Magento2 get admin URL

Magento2 get admin url.If   want to get admin URL to Magento 2 then you can try below Solution

In order to get admin  URL ,you need to inject the  Magento_Backend ‘s helper class Magento\Backend\Helper\Data  to  __construct() function.

 

Here you will get  Magento 2 get admin url from getAdminUrl() which basically return

Magento_Backend module’s  getHomePageUrl() function, This function also given admin home page url.

Magento2 get admin URL

2 Comments

Leave a Reply

Your email address will not be published. Required fields are marked *