I am trying to use views with a Micro app.
$app['view'] = function() { $view = new \Phalcon\Mvc\View(); $view->setViewDir('../app/views/'); $view->registerEngines(array( ".phtml" => 'Phalcon\Mvc\View\Engine\Volt' )); return $view; }
$app->get('/listing/{slug}', function($slug) use ($app) { echo $app['view']->render('listing_default', array( "slug" => $slug)); });
yields nothing. I have tried using the Simple view and made many changes that render nothing. The other routes I have all work fine when I simply echo content. Are there any examples of using views with Micro besides the main docs? I have copied/pasted the main Micro docs page and it still does not work for me.
Thanks!