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

nhayder's avatar
Level 13

Fixing renamed controller

i used to have OrgnizationController.php in my app but i had to change the name to IndustryController.php since then i keep on getting the error.

include(/Applications/MAMP/htdocs/app/vendor/composer/../../app/Http/Controllers/OrganizationController.php): failed to open stream: No such file or directory

What would be the fix for this.

0 likes
2 replies
Cronix's avatar
Cronix
Best Answer
Level 67

Did you change the classname as well class IndustryController? Also you need to run composer dumpautoload and php artisan clear-compiled

1 like

Please or to participate in this conversation.