PHP code example of buzzingpixel / twig-filetime
1. Go to this page and download the library: Download buzzingpixel/twig-filetime 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/ */
buzzingpixel / twig-filetime example snippets
declare(strict_types=1);
use Twig\Environment;
use Twig\Loader\FilesystemLoader;
use buzzingpixel\twigfiletime\FileTimeTwigExtension;
$twig = new Environment(new FilesystemLoader('/path/to/templates'), [
'debug' => true,
'cache' => '/path/to/cache',
'strict_variables' => true,
]);
$twig->addExtension(new FileTimeTwigExtension());