Unverified Commit 9c2b374c authored by Nicolas Widart's avatar Nicolas Widart Committed by GitHub

Merge pull request #647 from ChristianGiupponi/master

Prevent the bootWidgets() from being executed before middlewares checks
parents 0a7fc6c8 a7bb288d
...@@ -28,9 +28,14 @@ class DashboardController extends AdminBaseController ...@@ -28,9 +28,14 @@ class DashboardController extends AdminBaseController
public function __construct(RepositoryInterface $modules, WidgetRepository $widget, Authentication $auth) public function __construct(RepositoryInterface $modules, WidgetRepository $widget, Authentication $auth)
{ {
parent::__construct(); parent::__construct();
$this->bootWidgets($modules);
$this->widget = $widget; $this->widget = $widget;
$this->auth = $auth; $this->auth = $auth;
$this->middleware(function ($request, $next) use ($modules) {
$this->bootWidgets($modules);
return $next($request);
});
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment