Laravel version 5.6
I'm attempting to add some classes to my project via files under autoload.
Composer.json
"autoload": {
"classmap": [
"database/seeds",
"database/factories"
],
"psr-4": {
"App\\": "app/"
},
"files" : [
"app/helpers/dbUsers.php",
"app/helpers/dbMoodChart.php"
]
},
Whenever I do a composer dump-autoload
i get errors on both files saying files not found.
PHP Warning: Uncaught ErrorException: require(C:\laravel-projects\project\vendor\composer/../../app/helpers/dbUsers.php): failed to open stream: No such file or directory in C:\laravel-projects\project\vendor\composer\autoload_real.php:66 Stack trace:
Warning: Uncaught ErrorException: require(C:\laravel-projects\MoodWatch\vendor\composer/../../app/helpers/dbUsers.php): failed to open stream: No such file or directory in C:\laravel-projects\MoodWatch\vendor\composer\autoload_real.php:66 Stack trace:
The strange thing is its trying to load the files from the composer directory not the apps root folder. I've done this in another project and didn't have any issues. I've also compared my composer.json autoload sections on both projects and I can't see any syntax differences so I'm a bit puzzled as to why it's loading at the wrong location.
Has anyone seen anything similar before and be able to shed light on why it's doing this?