mirror of
https://github.com/stan220/chixana.git
synced 2026-09-08 17:28:46 +00:00
Added main controller.
This commit is contained in:
+2
-2
@@ -5,7 +5,7 @@
|
||||
"php": "^7.1.3",
|
||||
"ext-ctype": "*",
|
||||
"ext-iconv": "*",
|
||||
"sensio/framework-extra-bundle": "^5.1",
|
||||
"sensio/framework-extra-bundle": "^5.5",
|
||||
"symfony/apache-pack": "^1.0",
|
||||
"symfony/asset": "4.4.*",
|
||||
"symfony/console": "4.4.*",
|
||||
@@ -23,7 +23,7 @@
|
||||
"symfony/security-bundle": "4.4.*",
|
||||
"symfony/serializer-pack": "*",
|
||||
"symfony/translation": "4.4.*",
|
||||
"symfony/twig-pack": "*",
|
||||
"symfony/twig-pack": "^1.0",
|
||||
"symfony/validator": "4.4.*",
|
||||
"symfony/web-link": "4.4.*",
|
||||
"symfony/yaml": "4.4.*"
|
||||
|
||||
Generated
+1
-1
@@ -4,7 +4,7 @@
|
||||
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
|
||||
"This file is @generated automatically"
|
||||
],
|
||||
"content-hash": "bbb0d7b62b68b9ef9d037c916211df35",
|
||||
"content-hash": "d6e8bc8b46d0e946a35999599cf79156",
|
||||
"packages": [
|
||||
{
|
||||
"name": "doctrine/annotations",
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Controller;
|
||||
|
||||
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
|
||||
use Symfony\Component\HttpFoundation\Response;
|
||||
use Symfony\Component\Routing\Annotation\Route;
|
||||
|
||||
class MainController extends AbstractController
|
||||
{
|
||||
/**
|
||||
* @Route("/")
|
||||
*/
|
||||
public function index(): Response
|
||||
{
|
||||
$number = random_int(0, 100);
|
||||
|
||||
return $this->render('main.twig', [
|
||||
'number' => $number,
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,5 @@
|
||||
{% extends 'base.html.twig' %}
|
||||
|
||||
{% block body %}
|
||||
<h1>Your lucky number is {{ number }}</h1>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user