Friday, November 30, 2012

YARQ - Yet Another Routing Question

 

When defining a route in routes.php what is the correct way to code a link to a function where different variables can be passed?

 

For example the link can pass up to 5 args www.example.com/link/2/5/0/2/6 or as little as 1 www.example.com/link/2

Looking at the book it shows basic pass => for the know vars being passed but what if the vars passed can vary from 1 var to 5 vars.

 

I'm sure you do not to make 5 routes depending on each scenario?

 

Any insight would be great.

 

Thanks all

 

Dave

 

No comments: