문제

Let's say I have a history portal and I got something like this in my router: article/{century}/{decade}/{year}/{month}/{day}
The problem is that my controller have boolean default values for all these variables (false), because the business logic should decide what to show without specifying a date.
How can I do this without specifying multiple routes for this?

도움이 되었습니까?

해결책

 * @Route("article/{century}/{decade}/...", defaults={"century"="false", "decade"="false", ...})
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top