public function indexAction(Application $app, Request $request) { $rootDir = $app->getRootDir(); $packagesJson = $rootDir . '/web/packages.json'; $mtime = null; if (file_exists($packagesJson)) { $mtime = new \DateTime('@' . filemtime($packagesJson)); } return new Response($app->get('templating')->render('Default/index.html.twig', array('updatedAt' => $mtime))); }