문제

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