Commit a7bb288d authored by Christian Giupponi's avatar Christian Giupponi

Since the construct is executed before the middlewares, this will prevent the...

Since the construct is executed before the middlewares, this will prevent the bootWidgets() from being executed before the permissions checks
parent fe133a4b
......@@ -28,9 +28,14 @@ class DashboardController extends AdminBaseController
public function __construct(RepositoryInterface $modules, WidgetRepository $widget, Authentication $auth)
{
parent::__construct();
$this->bootWidgets($modules);
$this->widget = $widget;
$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