mardi 28 février 2017

Dynamic routing in laravel 5.2

I want to generate a url like 'top-hotels-in-india' here hotels and india is dynamic values that user will search. When i am using

Route::get("top-hotels-in-india",'Controller@method');

it works, but this is a static url i want this dynamic so changed this into

Route::get("top-{things}-in-{country}",'Controller@method');

But its not working. If i replace - with / its works perfect but i want hyphen in url instead of slash. What should i do to generate this types of routes. Please help.



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2m3nln4
via IFTTT

Aucun commentaire:

Enregistrer un commentaire