From 5a32d90adc61d3ff129ac0b303f04819f1ce243e Mon Sep 17 00:00:00 2001 From: jannisp Date: Thu, 22 Apr 2021 17:44:16 +0200 Subject: [PATCH] setup basic app controller --- src/Controller/AppController.php | 18 ++++++++++++++++++ templates/app/index.html.twig | 20 ++++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 src/Controller/AppController.php create mode 100644 templates/app/index.html.twig diff --git a/src/Controller/AppController.php b/src/Controller/AppController.php new file mode 100644 index 0000000..92450f6 --- /dev/null +++ b/src/Controller/AppController.php @@ -0,0 +1,18 @@ +render('app/index.html.twig', [ + 'controller_name' => 'AppController', + ]); + } +} diff --git a/templates/app/index.html.twig b/templates/app/index.html.twig new file mode 100644 index 0000000..6245d25 --- /dev/null +++ b/templates/app/index.html.twig @@ -0,0 +1,20 @@ +{% extends 'base.html.twig' %} + +{% block title %}Hello AppController!{% endblock %} + +{% block body %} + + +
+

Hello {{ controller_name }}! ✅

+ + This friendly message is coming from: + +
+{% endblock %}