问题
I'm running a Laravel 4 for a simple app on OS X.
Basically, changes to controllers and templates don't take effect for a long time after I save changes to those files. For example, I add a word to /app/views/index.blade.php, and don't see any change when constantly refreshing my browser for another minute or so. This makes iterative development understandably painful.
I have tried to chmod 777 app/storage/
and all enclosed files, which has no effect. I have also verified this is not a browser cache issue, because it happens (a) in both Chrome and Safari, and (b) regardless of clearing the cache in those browsers. The problem still occurs even when the app is in "local" and not "production" mode.
I should mention that I am running an updated DP version of OS X 10.9 Mavericks. I can't imagine that would have any effect on Laravel, though.
Edit
I tried calling clearstatcache() in start.php to see if that had any effect, and the problem still remained.
回答1:
This isn't a laravel issues but a PHP 5.5.3 + MAMP. OP Cache is on by default. see this answer for more: Stop caching for PHP 5.5.3 in MAMP
回答2:
Having the same issue as as autibyte (note: also recently upgraded to Mavericks, but besides File System permissions not sure how this would be impacting) --- but my blade templates no longer seem to be updating. I've tried permissions + clearing out the views folder. No joy.
回答3:
I was able to fix the issue by uninstalling MAMP (the app package), then installing PHP, Nginx, and MySQL with homebrew. Now all of my templates update, yay! I am pretty sure that the problem lied with the combination of Apache and Mavericks.
来源:https://stackoverflow.com/questions/19150767/laravel-templates-controllers-not-updating-on-save