【发布时间】:2016-09-04 04:04:18
【问题描述】:
尝试使用php artisan cache:clear 清除应用缓存,使用baao's ClearViewCache 清除视图缓存,但没有成功。
按照官方文档中的Basic Task List 教程,/app 文件夹中有一个空的任务模型。
命令php artisan --version 打印:Laravel Framework version Lumen (5.2.6) (Laravel Components 5.2.*)
______________________________________________________________
异常信息:
FileViewFinder.php 第 137 行中的 InvalidArgumentException:
未找到查看 [任务]。
- 在 FileViewFinder.php 第 137 行
- 在 FileViewFinder.php 第 79 行中的 FileViewFinder->findInPaths('tasks', array('/home/rodrigo/Laravel/lumen/resources/views'))
- 在 FileViewFinder->在 Factory.php 第 165 行中查找('tasks')
- 在工厂->make('tasks', array('tasks' => object(Collection)), array()) in helpers.php line 332
- 在 routes.php 第 22 行中的视图('tasks', array('tasks' => object(Collection)))
- 在关闭时->{closure}()
- 在 Container.php 第 507 行中的 call_user_func_array(object(Closure), array()) 处
- 在 Container->call(object(Closure), array()) 在 RoutesRequests.php 第 505 行
- 在 Application->callActionOnArrayBasedRoute(array(true, array(object(Closure)), array())) 在 RoutesRequests.php 第 479 行
- 在 Application->handleFoundRoute(array(true, array(object(Closure)), array())) 在 RoutesRequests.php 第 376 行
- 在 Application->Laravel\Lumen\Concerns{closure}() 在 RoutesRequests.php 第 629 行
- 在 Application->sendThroughPipeline(array(), object(Closure)) 在 RoutesRequests.php 第 382 行
- 在 RoutesRequests.php 第 327 行中的 Application->dispatch(null)
- 在 Application->run() in index.php 第 28 行
______________________________________________________________
我的项目结构截图:
【问题讨论】:
-
您的视图有
.php扩展名吗? -
他们只有 .blade 扩展名。 ¬¬ NetBeans 放置了 PHP 图标,因为这是我选择的。现在它说变量错误未定义。
-
所以它找到了视图,但是你得到了错误?可以贴一下这个视图的代码吗?
-
它与stackoverflow.com/questions/34454081/… 相同,但对我没有任何作用
-
您是否将
web中间件应用于您的路由?
标签: php laravel lumen lumen-5.2