Skip to content

Instantly share code, notes, and snippets.

@ollo-ride-nico
Created January 29, 2019 14:52
Show Gist options
  • Save ollo-ride-nico/7194c9853864e532d30e67c3957c1da9 to your computer and use it in GitHub Desktop.
Save ollo-ride-nico/7194c9853864e532d30e67c3957c1da9 to your computer and use it in GitHub Desktop.
<?php
namespace AppBundle\Controller;
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
/**
* Class DefaultController
* @package AppBundle\Controller
*/
class DefaultController
{
private $twig;
public function __construct(\Twig_Environment $twig)
{
$this->twig = $twig;
}
/**
* @Route("/", name="homepage")
* @return string
*/
public function __index()
{
return $this->twig->render('default/index.html.twig');
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment