I'm creating a CMS that allows the user to define categories. Categories can either have additional categories under it or pages. How can I create a route in Laravel that will support a potentially unlimited number of URI segments?
I've tried the following....
Route::get('/resources/{section}', ['as' => 'show', 'uses' => 'MasterController@show']);
I also tried making the route optional...
Route::get('/resources/{section?}', ['as' => 'show', 'uses' => 'MasterController@show']);
Keep in mind, section could be multiple sections or a page.