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/”
}

Sign up to discover human stories that deepen your understanding of the world.

Free

Distraction-free reading. No ads.

Organize your knowledge with lists and highlights.

Tell your story. Find your audience.

Membership

Read member-only stories

Support writers you read most

Earn money for your writing

Listen to audio narrations

Read offline with the Medium app

--

--

Lim Sing
Lim Sing

Responses (1)

Write a response