APP_NAME=Laravel
APP_ENV=local
APP_KEY=base64:
APP_DEBUG=true
APP_LOG_LEVEL=debug
APP_URL=http://localhost
@ibucoin 我觉得不大可能是版本的问题,因为上面那个项目里,不管是什么错误都只会显示Could not find resource 'views/layouts.html.php' in any resource paths,但是我明天还是试试换高版本,谢谢您的回答 :smile:
不知道你解决这个问题了嘛?
我今天也遇到这个问题了,最后找到问题出在哪儿了。
然后我按照他给的这个目录找到PrettyPageHandler.php
vendor\flip\whoops\src\Whoops\Handler\PrettyPageHandler.php
可以看到这一段代码:
$templateFile = $this->getResource("views/layouts.html.php");
$cssFile = $this->getResource("css/whoops.base.css");
然后在 vendor\flip\whoops\src\Whoops\Handler\Resource目录下可以看到,
很明显,这个地方只有一个layout.html.php的文件,于是我对比了另一个laravel5.5的安装包中的文件,确认了原本
PrettyPageHandler.php中应该是
$templateFile = $this->getResource("views/layout.html.php");
最后,我把这个改回来,发现就回到正常啦~
希望你也解决了这个问题~
Laravel的错误页面是用的whoops package
: https://github.com/filp/whoops
Laravel4是用它的,后来在Laravel5.0中移除了,然后Laravel5.5又加了进来.
推荐文章: