A started Craft CMS module for learning how to extend Craft CMS using CraftQuest.io tutorials.
- Download the module as a zip file.
- Unzip and place the
craft-modulesdirectory in yourmodulesdirectory in the Craft CMS project. - Update your Craft CMS project's
config/app.phpfile to include the module and bootstrap it.
return [
'id' => App::env('APP_ID') ?: 'CraftCMS',
'modules' => [
'craft-module' => craftquest\CraftModule::class,
],
'bootstrap' => ['craft-module'],
]; - Update the project's
composer.jsonfile to add the module to theautoloadsection of the file. It should look something like this:
"autoload": {
"psr-4": {
"craftquest\\": "modules/craft-module/src"
}
}, - Rebuild the project's Composer autoload files:
composer dump-autoload