Following the restful design, an url, where I handle a search query, should look like this:
/car/search/Audi
and the /car/search
should display the search form. I think the form should use GET method, but If I set the method to get (method="get"
), it will redirect to /car/search/?query=Audi
.
How can I define the form, so It will redirect to /controller/method/{variable}
?
Edit.: I am using PHP5.4, Laravel 4