My URL is something like this: http://localhost/sample/public/category/Electronics/Computers and Tablets/Tablets/iPad
Here is the list of Electronics, Computers and Tablets, Tablets etc are Categories and Sub categories. There may be N number of categories...
Is it possible to write a patterns that match the N number of categories instead of mentioning them individually as {cat1?}/{cat2?}/{cat3?} like it is done in the code below?
Route::group(['prefix' => 'category'], function () {
Route::get('/','CategoryController@show');
Route::get('/{cat1?}/{cat2?}/{cat3?}', 'CategoryController@show');
});
Any help is appreciated.