Routes: how to get mycontroller/id function same as mycontroller/action/id |
[eluser]dreamynsx[/eluser]
[quote author="marcoss" date="1192921895"] Now you have, http://site.com/cars/show/sports --> will list all cars on sports category. http://site.com/cars/show/sports/5 --> will get the car with id 5 in the sports category.[/quote] Actually I think your not understanding my full scenario, however your example should help me make it clearer. What if in your example, I want site.com/cars to show the list of all cars, and site.com/cars/sports to show list of all sports cars ? is this not possible without having the method 'show' in there? I do not want to have to do http://site.com/cars/show/sports. That extra show path seems uneccessary to me. |
Welcome Guest, Not a member yet? Register Sign In |