Laravel 视图未发现异常
本文介绍了Laravel 视图未发现异常的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我的路由函数找不到 laravel 视图的问题我做了 composer dumpautoload 但没有用ArticleController.php
I have problem with laravel view is not found by route function I did composer dumpautoload but no use ArticleController.php
无效参数异常
推荐答案
当 Laravel 在您的应用程序中找不到视图文件时会发生这种情况.确保您的 app/views
目录下有一个名为:index.php
或 index.blade.php
的文件.
This happens when Laravel doesn't find a view file in your application. Make sure you have a file named: index.php
or index.blade.php
under your app/views
directory.
请注意,Laravel 在调用 View::make
时会执行以下操作:
Note that Laravel will do the following when calling View::make
:
- 对于
View::make('index')
,Laravel 会查找文件:app/views/index.php
. - 对于
View::make('index.foo')
,Laravel 会查找文件:app/views/index/foo.php
.
- For
View::make('index')
Laravel will look for the file:app/views/index.php
. - For
View::make('index.foo')
Laravel will look for the file:app/views/index/foo.php
.
该文件可以具有以下两个扩展名中的任何一个:.php
或 .blade.php
.
The file can have any of those two extensions: .php
or .blade.php
.
这篇关于Laravel 视图未发现异常的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!