1

i've a problem with my routing.yml in Symfony. When i put a defaults value it's return me and empty value. I dont knopw why he does it. I do it like Symfony's doc but problem persist http://symfony.com/doc/current/book/routing.html

lapille_plateform_homepage:
        path:     /{page}
        defaults: 
            _controller: LAPILLEPlateformBundle:Advert:index
            page: 1
        requirements:
            page: \d*

and my error it's an empty variable like that Symfony error

Thanks a lot for you help.

Alexandre

SOLVED

Change requirements

requirements:
    page: \d*

by

requirements:
    page: \d+

thx all

1 Answers1

0

Try this :

lapille_plateform_homepage:
        path:     /{page}
        defaults: { _controller: LAPILLEPlateformBundle:Advert:index, page: 1}
        requirements:
            page: \d*
Ugo T.
  • 1,068
  • 8
  • 12