Magento 2 Call phtml file in CMS Page

Here we will learn how to call custom phtml file on any cms page or add phtml in your custom cms page.

First, go to the admin section and open CMS page in which you want to add phtml file.
Go to the content section and add blow code.
Note: Replace package and module with your custom module.

{{block class="Magento\Framework\View\Element\Template" template="Package_Module::test.phtml"}}

Are you want to add external CSS in cms page?
You just need to put below code in cms page->design tab->layout section.

Afer save CMS page clear cache.

Class Authorization GroupFactory Model does not exist magento2

Getting error Class Magento\Authorization\Model\Acl\Role\GroupFactory does not exist

Magento 2 is quite complex to understand. We frequently get this error while developing the store. Here is the solution to fix this error.

1) go to the var folder and find generation. now remove the folder.

2) Now run below code using the command line

php bin/magento setup:di:compile

It will automatically create all folder in the generation folder.

3) Then clear cache using below code:

php bin/magento cache:flush

Now, Run your store it will run without error.