I have the following route:
Route::controller('/boards', 'BoardController');
which responds to the following routes:
/boards -> function: getIndex()
/boards/board/Some-board-Alias -> function: getBoard()
what I want to do is - when I enter the following route:
/boards/board/Some-board-Alias/items
it will execute "BoardItemController", function: getItem()
I tried doing something like this:
Route::controller('/boards/board/{board_alias}/items', 'BoardItemController');
But when I enter the following route:
/boards/board/Some-board-Alias/items
it displays the content from:
/boards/board/Some-board-Alias
Looks like it treats "items" as a param and not as part of the route. is there a way using another controller for sub route?
Just to make it clear The route:
/boards/board/Some-board-Alias
Should access BoardController@getBoard (using Route::controller)
/boards/board/some-board-Alias/items
Should access BoardItemController@getIndex (using Route::controller) also:
/boards/board/some-board-alias/items/item/123
Should access BoardItemController@getItem($id) (using Route::controller)