1. Go to this page and download the library: Download ujpef/latte-view library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
ujpef / latte-view example snippets
$engine = new \Latte\Engine\Engine();
$engine->setLoader(new \Latte\Loaders\FileLoader(__DIR__ . '/../templates/'));
$engine->setTempDirectory(__DIR__ . '/../cache');
$latteView = new \Ujpef\LatteView\LatteView($engine);
use Latte\Engine;
use Latte\Loaders\FileLoader;
use Ujpef\LatteView;
$container['view'] = function ($container) use ($settings) {
$engine = new Engine();
$engine->setLoader(new FileLoader(__DIR__ . '/../templates/'));
$engine->setTempDirectory(__DIR__ . '/../cache');
$latteView = new LatteView($engine);
return $latteView;
};