Last active
August 8, 2018 19:14
-
-
Save tatma/35496164f4154eddffc93d8d0e9bf863 to your computer and use it in GitHub Desktop.
Creazione della rotta
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// ...previous content | |
/** | |
* @Route("/random/{max}", name="random") | |
*/ | |
public function random($max = 10) | |
{ | |
$randomNumber = random_int(0, $max); | |
return $this->render('Default/random.html.twig', [ | |
'randomNumber' => $randomNumber | |
]); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>random Zombie Process</title> | |
</head> | |
<body> | |
Numero random generato: {{ randomNumber }} | |
</body> | |
</html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment