Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

creez's avatar
Level 1

php artisan app:name AppName

Hello! After running the following artisan comand

php artisan app:name YourAppName

I now get the following error,

[Symfony\Component\Debug\Exception\FatalThrowableError]
Class 'App\Providers\AppServiceProvider' not found 

How do I fix it?

Thanks in advance?

0 likes
3 replies
tykus's avatar

The namespace must not have updated somewhere in the project. Search for App\Providers and change App to YourAppName

1 like
petrit's avatar

When changing app name you need to update your namespaces

So, instead using "App\Providers\AppServiceProvider", you should use "YourAppName\Providers\AppServiceProvider"

1 like

Please or to participate in this conversation.