Add HomeController

This commit is contained in:
Oliver Davies 2019-11-05 00:08:11 +00:00
parent f45c21b610
commit 1df3a68843
2 changed files with 26 additions and 0 deletions

View file

@ -0,0 +1,19 @@
<?php
namespace App\Controller;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\Routing\Annotation\Route;
class HomeController extends AbstractController
{
/**
* @Route("/", name="home")
*/
public function index()
{
return $this->render('index.html.twig', [
'eventName' => 'PHP South Wales',
]);
}
}

View file

@ -0,0 +1,7 @@
{% extends 'base.html.twig' %}
{% block title %}Hi {{ eventName }}!{% endblock %}
{% block body %}
<h1>Hi {{ eventName }}!</h1>
{% endblock %}