Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // LuckyController.php
- class LuckyController extends Controller
- {
- public function numberAction($max)
- {
- $number = mt_rand(0,$max);
- return $this->render('number.html.twig',
- array('number' => $number));
- }
- }
- // routing.yml
- Lucky:
- path: /rndnumber/{max}
- defaults: {
- _controller: AppBundle:Lucky:number, max: 100 }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement