0

I'm attempting to create the following routing :

/app/{type}
/app/{type}.{format}
/app/{type}/{limit}
/app/{type}/{limit}.{format}

I would like all of these routes to route to a single method. Do I need to declare a route for each of the paths and params ? Does the ranking of the routes also matter ? e.g do I have to place

/app/{type}.{format}

first before

/app/{type}

?

1

Yes, you need to define a route for each path.

The order should not matter, it will put them all in the router table and then "order" them by the best match first.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.