This package is abandoned and no longer maintained. No replacement package was suggested.

Preview Twig templates in the browser

v1.0.0-beta2 2018-11-27 16:57 UTC

This package is auto-updated.

Last update: 2022-03-28 03:58:57 UTC


README

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.