Laravel Class ‘App\Modules\ServiceProvider’ not found

Lim Sing
1 min readJul 14, 2020

I have create a module named Core using this command php artisan module:make Core. However, when i try run composer dump-autoload, hit this error.

And finally i found the solution:

  1. Need to add “Modules\”: “Modules/” psr-4 part in your root composer.json file:

“psr-4”: {
“App\”: “app/”,
“Modules\”: “Modules/”
}

--

--