0

Is there a way to turn this url

http://example.com/search?values[]=foo&values[]=bar&more[]=baz&more[]=fab

into something a bit more friendly?

http://example.com/search/values/<mutliple-items>/more/<mutliple-items>

Craig Ward
  • 2,425
  • 5
  • 33
  • 51

2 Answers2

0

Try with this:

Route::get('search/values/{mutliple_items1}/more/{mutliple_it‌​ems2}', 'SearchController@search');
hizbul25
  • 3,829
  • 4
  • 26
  • 39
0

The answer was provided by @alexslipknot

Route::get('search/values/{slashValues?}/more/{slashMore?}', 'Website\SearchController@searchTest')
    ->where('slashValues', '(.*)')
    ->where('slashMore', '(.*)');

and it works perfectly

Craig Ward
  • 2,425
  • 5
  • 33
  • 51