Laravel 5.6重现错误 [英] Laravel 5.6 Reoccuring Error
问题描述
无论Laravel 5.6中发生了什么实际错误,我都会发生一个错误,对于引起错误并且没有显示Laravel通常显示的完整调试页面的所有内容,我只会说Could not find resource 'views/layouts.html.php' in any resource paths.(searched: /var/www/{domain}/vendor/filp/whoops/src/Whoops/Handler/../Resources)
.除了重新安装Laravel,我不确定是什么原因引起的,或者我可以做些什么来修复它,我非常希望不要这样做.有人知道我可能缺少什么文件或什么原因吗?
I have an error that occurs no matter what the actual error is within Laravel 5.6 It just keeps saying Could not find resource 'views/layouts.html.php' in any resource paths.(searched: /var/www/{domain}/vendor/filp/whoops/src/Whoops/Handler/../Resources)
for everything that causes an error and doesn't display the full debug page that Laravel usually displays. I'm not sure what caused this or what I could do to fix it besides reinstalling Laravel, which I'd highly prefer not to do. Does anybody have any ideas what file I might be missing or what might be causing this?
完全错误的图片: https://i.imgur.com/5dFhlYg.png
推荐答案
为什么使用layout.html.php
. Laravel有一个模板引擎刀片.您可以使用layout.blade.php
why you use layout.html.php
. Laravel has a template engine blade. you can use layout.blade.php
您需要使用views.layout
.例如:
return view('views.layout');
但是请注意,其中有一些视图是文件夹名称.如果在views文件夹下创建一个文件夹,则可以调用views文件夹. Laravel的默认views文件夹是views
,不需要调用return path
.
But note there are views is a folder name. if you create a folder under views folder then you can call views folder. Laravel default views folder is views
don't need to call on return path
.
这篇关于Laravel 5.6重现错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!