Created
January 29, 2019 14:52
-
-
Save ollo-ride-nico/7194c9853864e532d30e67c3957c1da9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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