Laravel模板/控制器在保存时未更新 [英] Laravel templates/controllers not updating on save

查看:94
本文介绍了Laravel模板/控制器在保存时未更新的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在OS X上为一个简单的应用程序运行Laravel 4.

I'm running a Laravel 4 for a simple app on OS X.

基本上,对控制器和模板的更改在我保存对那些文件的更改后很长时间都不会生效.例如,我在/app/views/index.blade.php中添加了一个单词,并且在不断刷新浏览器一分钟左右时看不到任何变化.这使得迭代开发令人痛苦,这是可以理解的.

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.

我已尝试chmod 777 app/storage/和所有附带的文件,但没有任何效果.我还验证了这不是浏览器缓存问题,因为它发生在(a)Chrome和Safari中,以及(b)不管清除那些浏览器中的缓存如何.即使应用程序处于本地"模式而不是生产"模式,该问题仍然会发生.

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.

我应该提到我正在运行OS X 10.9 Mavericks的更新的DP版本.不过,我无法想象这会对Laravel产生任何影响.

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.

我尝试在start.php中调用clearstatcache()看看是否有任何效果,问题仍然存在.

I tried calling clearstatcache() in start.php to see if that had any effect, and the problem still remained.

推荐答案

我能够通过卸载MAMP(应用程序包),然后使用自制软件安装PHP,Nginx和MySQL来解决此问题.现在我所有的模板都更新了,是的!我很确定问题出在Apache和Mavericks的结合上.

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.

这篇关于Laravel模板/控制器在保存时未更新的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆