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-modules
directory in yourmodules
directory in the Craft CMS project. - Update your Craft CMS project's
config/app.php
file 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.json
file to add the module to theautoload
section 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