InvalidArgumentException,"View not found",关于 Lumen 5.2.6
InvalidArgumentException, "View not found", on Lumen 5.2.6
尝试使用 php artisan cache:clear
清除应用程序缓存并使用 baao's ClearViewCache 清除视图缓存,但没有成功。
按照官方文档中的Basic Task List教程,/app 文件夹中有一个空的任务模型。
命令php artisan --version
打印:Laravel 框架版本 Lumen (5.2.6) (Laravel Components 5.2.*)
______________________________________________________________
异常信息:
InvalidArgumentException in FileViewFinder.php line 137:
View [tasks] not found.
- in FileViewFinder.php line 137
- at FileViewFinder->findInPaths('tasks', array('/home/rodrigo/Laravel/lumen/resources/views')) in FileViewFinder.php line 79
- at FileViewFinder->find('tasks') in Factory.php line 165
- at Factory->make('tasks', array('tasks' => object(Collection)), array()) in helpers.php line 332
- at view('tasks', array('tasks' => object(Collection))) in routes.php line 22
- at Closure->{closure}()
- at call_user_func_array(object(Closure), array()) in Container.php line 507
- at Container->call(object(Closure), array()) in RoutesRequests.php line 505
- at Application->callActionOnArrayBasedRoute(array(true, array(object(Closure)), array())) in RoutesRequests.php line 479
- at Application->handleFoundRoute(array(true, array(object(Closure)), array())) in RoutesRequests.php line 376
- at Application->Laravel\Lumen\Concerns{closure}() in RoutesRequests.php line 629
- at Application->sendThroughPipeline(array(), object(Closure)) in RoutesRequests.php line 382
- at Application->dispatch(null) in RoutesRequests.php line 327
- at Application->run() in index.php line 28
______________________________________________________________
我的项目结构截图:
自 5.2 版以来,Lumen 框架不再支持任何 templating/views,而是专注于过时的 RESTful API。
请参阅 offical release notes 和以下摘录:
Lumen 5.2 represents a shift on slimming Lumen to focus solely on serving stateless, JSON APIs. As such, sessions and views are no longer included with the framework. If you need access to these features, you should use the full Laravel framework. Upgrading your Lumen application to the full Laravel framework mainly involves copying your routes and classes over into a fresh installation of Laravel. Since Laravel and Lumen share many of the same components, your classes should not require any modification.
尝试使用 php artisan cache:clear
清除应用程序缓存并使用 baao's ClearViewCache 清除视图缓存,但没有成功。
按照官方文档中的Basic Task List教程,/app 文件夹中有一个空的任务模型。
命令php artisan --version
打印:Laravel 框架版本 Lumen (5.2.6) (Laravel Components 5.2.*)
______________________________________________________________
异常信息:
InvalidArgumentException in FileViewFinder.php line 137:
View [tasks] not found.
- in FileViewFinder.php line 137
- at FileViewFinder->findInPaths('tasks', array('/home/rodrigo/Laravel/lumen/resources/views')) in FileViewFinder.php line 79
- at FileViewFinder->find('tasks') in Factory.php line 165
- at Factory->make('tasks', array('tasks' => object(Collection)), array()) in helpers.php line 332
- at view('tasks', array('tasks' => object(Collection))) in routes.php line 22
- at Closure->{closure}()
- at call_user_func_array(object(Closure), array()) in Container.php line 507
- at Container->call(object(Closure), array()) in RoutesRequests.php line 505
- at Application->callActionOnArrayBasedRoute(array(true, array(object(Closure)), array())) in RoutesRequests.php line 479
- at Application->handleFoundRoute(array(true, array(object(Closure)), array())) in RoutesRequests.php line 376
- at Application->Laravel\Lumen\Concerns{closure}() in RoutesRequests.php line 629
- at Application->sendThroughPipeline(array(), object(Closure)) in RoutesRequests.php line 382
- at Application->dispatch(null) in RoutesRequests.php line 327
- at Application->run() in index.php line 28
______________________________________________________________
我的项目结构截图:
自 5.2 版以来,Lumen 框架不再支持任何 templating/views,而是专注于过时的 RESTful API。
请参阅 offical release notes 和以下摘录:
Lumen 5.2 represents a shift on slimming Lumen to focus solely on serving stateless, JSON APIs. As such, sessions and views are no longer included with the framework. If you need access to these features, you should use the full Laravel framework. Upgrading your Lumen application to the full Laravel framework mainly involves copying your routes and classes over into a fresh installation of Laravel. Since Laravel and Lumen share many of the same components, your classes should not require any modification.