Вопрос

While learning to build Magento 2 extensions, I have come across several tutorials (blogs, books and videos) teaching me different things. When it comes to registering a new extension, some tutorials ask me to manually add my extension to the app/etc/config.php file, while others say it is out of place to manually edit the app/etc/config.php.

Is it right to manually add an extension to the configuration (app/etc/config.php) file?

Это было полезно?

Решение

It is not ideal process to Add an extension directly from app/etc/config.php.

In other to add an extension you have to run

php bin/magento module:enable {Vendorname}_{ModuleName}

After running this command a record inserted at config.php ` like

{Vendorname}_{ModuleName} => 1

then you have to run setup upgrade command

php bin/magento setup:upgrade

Note that running, of Module disable command makes `

{Vendorname}_{ModuleName} => 0`

php bin/magento module:disable {Vendorname}_{ModuleName}

Лицензировано под: CC-BY-SA с атрибуция
Не связан с magento.stackexchange
scroll top