I've been using Laravel since a few months and it's an awesome framework, but I have a doubt regarding resource controllers and the proper structure for nested controllers.
When you register a new resource route, for example 'foo' (with FooController), and then you register another one ('bar', BarController) everything is fine, until you start needing to nest them as foo.bar.
Laravel docs suggest you to use a different controller for this relation, named FooBarController; but what about if we decide that we need to get two more levels in the in depth? Something like foo.bar.bez.biz, then we find ourselves with four controllers:
Route::resource('foo', 'FooController')
Route::resource('foo.bar', 'FooBarController')
Route::resource('foo.bar.bez', 'FooBarBezController')
Route::resource('foo.bar.bez.biz', 'FooBarBezBizController')
Your controllers folder is suddenly overpopulated with long-hard-to-write controller names. Here is where I start thinking I'm doing something wrong and this is why I'm asking for some advice.
Is it OK to have that bunch of controllers? I've been thinking about having a single FooController (BarController, BezController, etc) and handle everything that way, but I'm afraid this isn't clear enough when you work with more people.
Thanks,
M