Closed voidgraphics closed 5 years ago
In my opinion we shouldn't autoload the LoadPageForCurrentRoute
middleware since most Laravel projects will only need this package on some specific routes. It should be the developer's choice to apply the middleware or not depending his project's requirements.
What if you want autoloading, but not on the "web" middleware group?
Also, the middleware is not the only way to load static content. We should let the developer decide how to load the content knowingly.
There is an option to automatically load middleware in Laravel Packages.
It works like this:
Maybe we can load it by default, to make installation easier and quicker, which would be very nice. We can then also make it possible to disable the middleware autoload with a boolean in the config file.