When you use the GrumPHP code sniffer tool to commit your code for the project to follow the Magento Coding Standard.
GrumPHP is the Automatic Code Quality Checker tool for PHP-based applications.
3x Magento Master
When you use the GrumPHP code sniffer tool to commit your code for the project to follow the Magento Coding Standard.
GrumPHP is the Automatic Code Quality Checker tool for PHP-based applications.
You can get base URL of the backend/admin panel in javascript(JS) file to fetch Custom URL of a site to call ajax request in backend area.
‘mage/url’ widget is not used to fetch backend base URL in Magento 2.
You need to create a template file using layout XML and define the base URL of the backend under the template file.
You can get the custom or base URL of the store in a javascript(JS) file for the frontend area using the 'mage/url' widgets.
You have to pass the 'mage/url' widget as a dependency in a define([]) or require([]) function of the javascript file.