Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Views in Lumen 5.2+

I need to build a small widget, and was planning to use the Lumen for this because I need a quick response and I need components such as routing, translation, requests and views. the problem is noticed now that the views were discontinued after version 5.1.

Is it possible to use views in more recent versions of Lumen?

like image 707
Miguel Borges Avatar asked Oct 01 '16 23:10

Miguel Borges


1 Answers

While Lumen 5.2.0 originally stripped out views, they were added back in in Lumen 5.2.1, and have been available since. You should be able to use views without an issue.

resources/views/test.blade.php:

Hello, world!

routes.php:

$app->get('/', function () use ($app) {
    return view('test');
});
like image 171
patricus Avatar answered Nov 16 '22 02:11

patricus