Add HomeController
This commit is contained in:
parent
f45c21b610
commit
1df3a68843
19
src/Controller/HomeController.php
Normal file
19
src/Controller/HomeController.php
Normal 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',
|
||||
]);
|
||||
}
|
||||
}
|
7
templates/index.html.twig
Normal file
7
templates/index.html.twig
Normal file
|
@ -0,0 +1,7 @@
|
|||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block title %}Hi {{ eventName }}!{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Hi {{ eventName }}!</h1>
|
||||
{% endblock %}
|
Loading…
Reference in a new issue