Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How installing blade template in Microframework Lumen?

I have this version: Lumen (5.2.6) (Laravel Components 5.2.*)

like image 519
Alex Quintero Avatar asked Feb 27 '26 05:02

Alex Quintero


1 Answers

It's installed by default.

$app->get('/', function () use ($app) {
    return $app->make('view')->make('welcome');
});

Make a file /resources/views/welcome.blade.php to see it works.


UPDATE

In Lumen 5.5, you can do this:

$router->get('/', function () use ($router) {
    return $router->app->make('view')->make('welcome');
});
like image 85
krisanalfa Avatar answered Feb 28 '26 20:02

krisanalfa