We sacrifice by not doing any other technology, so that you get the best of Magento.

We sacrifice by not doing any other technology, so that you get the best of Magento.

    Here, we have described how to check whether the current area is frontend or backend

    Well, you can check it with object manager

    $objectManager = MagentoFrameworkAppObjectManager::getInstance();
    $areastate =  $objectManager->get('MagentoFrameworkAppState');
    echo $areastate->getAreaCode();

    so it will show you that the current area is frontend or adminhtml

    field_5bfb909c5ccae

      Get a Free Quote