Closed EmilMoe closed 6 years ago
perhaps #57 can help on this?
A solution would be to override the loadScannedRoutes method in your AnnotationsServiceProvider like this:
protected function loadScannedRoutes()
{
$this->app->booted(function () {
$router = $this->app['Illuminate\Contracts\Routing\Registrar'];
$router->group(['middleware' => 'web'], function() use($router) {
require $this->finder->getScannedRoutesPath();
});
});
}
We accept pull requests.
Following https://github.com/LaravelCollective/annotations/issues/44
Is there a way to globally add these to all routes? I tried in Controller.php but that didn't work. I would like not have to write it in top of all my controllers.