I'm creating a Symfony CMS by myself. I want to map paths like /login
and /{slug}
at the same time, but I don't know if it is possible.
I tried simply setting both of the paths in 2 different controllers, but that didn't seem to work.
/**
*@Route('/login', name='login')
*/
public function login(){}
/**
*@Route('/{slug}', name='dynamic-site')
*/
public function dynamicSite(){}
With the setup above, the second path is reached every single time. There is no way to visit login. I expected Symfony to first try finding hard-coded routes, but it seems like it doesn't work like that.