我正在使用Laravel设置我的第一个项目,但显示应用程序错误是一件大事。
一切正常时效果很好,但如果出现任何错误,我会看到白屏。
app / storage文件夹设置为777(我知道它不应该)并且调试是真的。
Nginx错误日志抱怨缺少view / layout.html.php,我认为这与错误视图生成有关。
我在Laravel网站上的宅基地VM工作。我已经使用composer创建了该项目,并且从VM和主机启动了laravel.phar,我得到了同样的情况。
这是工匠尾巴日志:
#3 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8943): Illuminate\Exception\WhoopsDisplayer->display(Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#4 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8895): Illuminate\Exception\Handler->displayException(Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#5 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(692): Illuminate\Exception\Handler->handleException(Object(Symfony\Component\HttpKernel\Exception\NotFoundHttpException))
#6 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(7425): Illuminate\Foundation\Application->handle(Object(Illuminate\Http\Request), 1, true)
#7 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8031): Illuminate\Session\Middleware->handle(Object(Illuminate\Http\Request), 1, true)
#8 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(7978): Illuminate\Cookie\Queue->handle(Object(Illuminate\Http\Request), 1, true)
#9 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(10747): Illuminate\Cookie\Guard->handle(Object(Illuminate\Http\Request), 1, true)
#10 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(648): Stack\StackedHttpKernel->handle(Object(Illuminate\Http\Request))
#11 /home/vagrant/Code/Laravel/public/fazendafarao/public/index.php(49): Illuminate\Foundation\Application->run()
#12 {main} [] []
[2014-06-10 13:54:17] local.ERROR: exception 'Symfony\Component\Debug\Exception\FatalErrorException' with message 'Uncaught exception 'RuntimeException' with message 'Could not find resource 'views/layout.html.php' in any resource paths.(searched: /home/vagrant/Code/Laravel/public/fazendafarao/vendor/laravel/framework/src/Illuminate/Exception/resources, /var/www/working/laravel-master/vendor/filp/whoops/src/Whoops/Handler/../Resources)' in /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php:10631
Stack trace:
#0 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(10513): Whoops\Handler\PrettyPageHandler->getResource('views/layout.ht...')
#1 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(10361): Whoops\Handler\PrettyPageHandler->handle(Object(RuntimeException))
#2 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8837): Whoops\Run->handleException(Object(RuntimeException))
#3 /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php(8943): Illuminate\Exception\WhoopsDisplayer->display(Object(RuntimeException))
#4 /home/vagrant/Code/L' in /home/vagrant/Code/Laravel/public/fazendafarao/bootstrap/compiled.php:10631
Stack trace:
#0 [internal function]: Illuminate\Exception\Handler->handleShutdown()
#1 {main} [] []
有人有线索吗?
答案 0 :(得分:0)
我终于明白了。安装" laravel new"如在http://laravel.com/docs/quick#installation中导致一些依赖关系问题。但它与作曲家一起安装。
答案 1 :(得分:0)
我发现运行php artisan optimize
解决了我的问题(Laravel 4.2)