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

raju1705's avatar

Target class [App\Http\Controllers\Studentcontroller] does not exist.

my laravel project was running perfectly in the localhost but when I uploaded my project in the server it is showing the error. Target class [App\Http\Controllers\Studentcontroller] does not exist.

0 likes
5 replies
Dropelikeit's avatar

Try out:

composer dumpautoload

Do you synchronize the vendor folder with? Or do you do "composer install" on your server ?

If you use "composer install", then show your Controller.

You write student controllers, is the file also called student controller or rather StudentController?

If you wrote "StudentController" in your file name, your class must also be called StudentController.

1 like
raju1705's avatar

thank you. I guess my controller name is correct as the project is running perfectly in the localhost.

Snapey's avatar
Snapey
Best Answer
Level 122

check the spelling of all paths and class names. They must all use the same letter case.

For instance, is it Studentcontroller or StudentController. They are not the same.

After making any changes to class names or file names be sure to run composer dump

raju1705's avatar

thank you. your solution worked. but it was perfectly working in localhost I don't know why.

Snapey's avatar

Your localhost will be case-insensitive.

Please or to participate in this conversation.