From 1df3a6884306d5f775dc1e23da0e2a93dfeb9cab Mon Sep 17 00:00:00 2001 From: Oliver Davies Date: Tue, 5 Nov 2019 00:08:11 +0000 Subject: [PATCH] Add HomeController --- src/Controller/HomeController.php | 19 +++++++++++++++++++ templates/index.html.twig | 7 +++++++ 2 files changed, 26 insertions(+) create mode 100644 src/Controller/HomeController.php create mode 100644 templates/index.html.twig diff --git a/src/Controller/HomeController.php b/src/Controller/HomeController.php new file mode 100644 index 0000000..6beadc1 --- /dev/null +++ b/src/Controller/HomeController.php @@ -0,0 +1,19 @@ +render('index.html.twig', [ + 'eventName' => 'PHP South Wales', + ]); + } +} diff --git a/templates/index.html.twig b/templates/index.html.twig new file mode 100644 index 0000000..4c453d6 --- /dev/null +++ b/templates/index.html.twig @@ -0,0 +1,7 @@ +{% extends 'base.html.twig' %} + +{% block title %}Hi {{ eventName }}!{% endblock %} + +{% block body %} +

Hi {{ eventName }}!

+{% endblock %}