Skip to content
Discussion options

You must be logged in to vote

In route file i will add this code working this way


$app = Flight::app();

$app->register('latte', LatteEngine::class, [], function(LatteEngine $latte) use ($app) {

    // This is where Latte will cache your templates to speed things up
    // One neat thing about Latte is that it automatically refreshes your
    // cache when you make changes to your templates!
    $latte->setTempDirectory(__DIR__ . '/../cache/');

    // Tell Latte where the root directory for your views will be at.
    // $app->get('flight.views.path') is set in the config.php file
    //   You could also just do something like `__DIR__ . '/../views/'`
    $latte->setLoader(new \Latte\Loaders\FileLoader($app->get('fl…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@madfortech
Comment options

Comment options

You must be logged in to vote
1 reply
@n0nag0n
Comment options

Answer selected by madfortech
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants