Wednesday, March 29, 2017

How to put plural parameters into url with laravel

I want to build a website with a plural levels in the url. When it gets deeper,I find it difficult to get the parameters in the url.For example, www.example.com/level1/level2, I can get plural parameters level2(plural pages) because I know level1,but as it keeps going like level1/level2/level3,since parameter level2 is unknown value,how should I get level3? Because based on what I'm thinking, there are level4 and level5, at last, should the route file look like Route::get('/{parameter1}/{parameter2}/{parameter3}/{parameter4}','Controller@func')? Any reply will be appreciated!



via Ben

Advertisement