First attempt at making a module. So far all I've done is try to change the namespace of the template that was included with my freshly installed craft 3.0.23.1 project.
Was following the official docs (https://docs.craftcms.com/v3/extend/module-guide.html#set-up-the-basic-file-structure) and spend a few hours trying to figure this out on various searches here and elsewhere.
So in the file '/modules/Module.php' I changed
namespace modules;
to
namespace banana\modules;
, then in '/composer.json' changed:
"autoload": {
"psr-4": {
"modules\\": "modules/"
}
},
to
"autoload": {
"psr-4": {
"banana\\modules\\": "modules/"
}
},
Then in Terminal, ran the command 'composer dump-autoload -a' in the project folder. Reload the page and I get the error. Other than just doing the setup wizard, i haven't touched any other files in the project.
Thanks @andrew.welch for pointing me in the right direction.
– MrMagicalBananaful Sep 10 '18 at 18:00