Reputation: 1809
Tried clearing the app cache with php artisan cache:clear
and the views' cache with baao's ClearViewCache, but it didn't work.
Followed the Basic Task List tutorial from the official docs, there's an empty Task model in /app folder.
The command php artisan --version
prints: Laravel Framework version Lumen (5.2.6) (Laravel Components 5.2.*)
The exception message:
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
Screenshot of my project's structure:
Upvotes: 1
Views: 1866
Reputation: 5174
Since release 5.2, the Lumen framework does not support any templating/views anymore, instead it focuses on staless RESTful APIs.
Please see the offical release notes with the following excerpt:
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.
Upvotes: 2