hofa / lumenTwig by hofa

Adds the power of Twig to Lumen
32
1
2
Package Data
Maintainer Username: hofa
Maintainer Contact: egi.hasdi@gmail.com (Egi Hasdi)
Package Create Date: 2019-05-12
Package Last Update: 2019-05-12
Language: PHP
License: MIT
Last Refreshed: 2024-04-26 15:00:10
Package Statistics
Total Downloads: 32
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 2
Total Forks: 0
Total Open Issues: 0

lumenTwig

lumen support twig template

install

composer require hofa/lumen-twig

bootsrap/app.php

$app->register(LumenTwig\TwigServiceProvider::class);

uses

view('tests/index.twig', ['a' => 1]);
touch resource/view/tests/index.twig

twig global variable

{{ reqeust.input('query', 1)}}
{{ app('hash').make('a123456')}}
{{ session...}} {{ url...}} {{ auth...}}