I think is good something like
Route::group(['prefix' => 'blog'], function(){
MyBlog::init();
});
May Sale! All accounts are 40% off this week.
I'm totally down with external packages that offer generic utility/library-style functionality, and using Composer to bring these in, but I'm curious where "mini-app" style functionality belongs?
The kind of functionality that defines its own routes and controllers and slots into your app; a blog being a good example, a generic e-commerce platform being another.
Defining routes and controllers in packages is quite inflexible in Laravel, as you can't "undefine" routes, or change how controllers works. They're also very difficult to test in isolation. This leads me to think perhaps controllers and routes is an anti-pattern and that they should be reserved for just apps.
However, there doesn't seem to be an elegant way to encapsulate and reuse functionality across multiple apps in Laravel without using packages.
Am I missing something?
Please or to participate in this conversation.