Welcome to the Treehouse Community

The Treehouse Community is a meeting place for developers, designers, and programmers of all backgrounds and skill levels to get support. Collaborate here on code errors or bugs that you need feedback on, or asking for an extra set of eyes on your latest project. Join thousands of Treehouse students and alumni in the community today. (Note: Only Treehouse students can comment or ask questions, but non-students are welcome to browse our conversations.)

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and a supportive community. Start your free trial today.

PHP Building Websites with PHP Slim Basics & Twig Templates Layouts with Twig

Keep getting this error:

Fatal error: Class 'Slim\Views\Twig' not found in /home/treehouse/workspace/index.php on line 10

This is my index code:

require 'vendor/autoload.php';
date_default_timezone_set ('America/Bogota');

//$log = new Monolog\Logger('name');
//$log->pushHandler(new Monolog\Handler\StreamHandler('app.txt', Monolog\Logger::WARNING));
//$log->addWarning('Foo Fighers');

$app = new \Slim\Slim( array ( 
    'view' => new \Slim\Views\Twig ()
)) ;

$view = $app-> view ();
$view->parserOptions = array(
    'debug' => true

$view->parserExtensions = array(
    new \Slim\Views\TwigExtension (),

$app->get('/', function () use($app){
  }) ;

$app->get('/contact', function () use($app){