V
V
v7sila2018-08-08 15:55:17
symfony
v7sila, 2018-08-08 15:55:17

How to make route (routing) parameter optional in Symfony 3 like in Laravel?

service_detail:
    path:     /detail/{id}
    defaults: { _controller: ServiceBundle:Servis:detail }

In Laravel {name?} you can use the ? Is it possible to do the same in Symfony?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Denis Derepko, 2018-08-08
@v7sila

default placeholder value

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question