現在、カスタム レベル ビューに次のルーティング形式を使用しています。
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');
});
});
お気付きかもしれませんが、私はグローバルな「customer_id」を使用しており、サブページには「id」を使用しています。「customer_id」をすべてのコントローラーとコントローラー内のすべての関数に渡す必要があります。これを行う最もクリーンな方法は何ですか?