Preview Twig templates in the browser
Create a workshop.php
file:
<?php
$templatesDir = '/path/to/templates';
$twig = new \Twig_Environment(new \Twig_Loader_Filesystem($templatesDir));
$this->setTwig($twig);
$templates = new TemplateDirectory($templatesDir);
$this->setTemplates($templates);
Start the workshop server:
./vendor/bin/workshop serve workshop.php
View the workshop at http://localhost:8000.