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

fdjunior's avatar

Changes in Laravel's Controller not work after save

I working right now in a laravel project. I'm having some problems when i make changes in controllers, they are not taking in count but after a while. So i need to reload my page several times till i can see the changes. This is frustrating cause sometime i don't know if i'm doing something wrong.

I'm working with Laravel 5.7.9 over a MAMP enviroment I have tried working with laravel self server provider (php artisan serve) and i got the same problem.

I already change my CACHE_DRIVER from file to array cause a read somewhere this could be a solution, and nothing.

Does anyone have any idea about this? Thanks in advance.

0 likes
4 replies
goatshark's avatar

@fdjunior When I run into things like this, I start dropping dd('oh shit'); lines generously...one a time though - I'm not completely nuts. You could even start by using it in a callback in the route you're trying to hit. I've done that when I felt that I needed a complete sanity check.

fdjunior's avatar

@goatshark some time i do that too, even run php artisan cache:clear && php artisan view:clear cause a suspect this is a cache thing. But i don't think it's ok to do this every time i make a change.

goatshark's avatar

@fdjunior Okay or not okay, it certainly shouldn't be needed.

Have you run for a while making sure you're in an incognito (or equivalent for your browser) window. Browser cache has cost me more minutes than I'd like to count.

fdjunior's avatar

@goatshark i work with Chrome and disabled cache from dev tools. Anyway i will try working in incognito tabs to see how it goes.

Please or to participate in this conversation.