Currently I'm using this routing format for my custom level views:
Route::group(['prefix' => 'customers/{customer_id}'], function(){
Route::group(['prefix' => 'orders'], function(){
Route::get('/', 'controllers\EndUser\Accounting\OrderController@getList');
Route::get('/{id}', 'controllers\EndUser\Accounting\OrderController@getView');
});
});
If you notice, I'm using a global 'customer_id' and for my sub pages I use a 'id'. I need to pass the 'customer_id' to every controller and every function in the controller, what would be the cleanest way of doing this?