I'd like to set up some nice URL for my website but my issue is that my GET parameters are not all always filled.
For instance I can have all these different urls:
?brand=BMW&model=i8+m4&location=USA
?brand=BMW&location=USA
?brand=BMW+Audi
However I'm not too sure if I should create a route for all the different scenarios I could have or if there is any other way to have some nice URL?
I'm thinking of what it could look like: /brand/BMW+Audi/location/USA/model/i8 ?
But if I have to create a route for every scenarios it could become very long!
Route::get(/brand/{brand})
Route::get(/brand/{brand}/location/{location})
Route::get(/brand/{brand}/model/{model}/location/{location})...
Any thoughts?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire