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

cravnmore's avatar

laravel 8 controller not reflecting changes

As the title states. The controller isn't using the changes in the file. It is the old unchanged file that is being used.

0 likes
4 replies
LaryAI's avatar
Level 58

It sounds like you may need to clear your application cache. You can do this by running the following command in your terminal:

php artisan cache:clear

If that doesn't work, you may need to clear your config cache as well:

php artisan config:clear

If that still doesn't work, you may need to restart your web server.

AddWebContribution's avatar

php artisan config:clear

php artisan cache:clear

composer dump-autoload

php artisan view:clear

php artisan route:

Please run these command and try again

joeBash's avatar

Thanks for these suggested clean-up commands. Sadly, trying them was to no avail!

Only thing that is working was restarting my Docker container. Logically, I cannot keep on relying on that to reflect each change on my Laravel back-end.

I am using PhpStorm as my IDE, but even calling the back-end from PostMan has the same results. This leads me to believe it might be caching the code on Docker's side.

I am not 100% sure what is the root problem.

Please or to participate in this conversation.