Skip to content

Commit

Permalink
Merge pull request #647 from ChristianGiupponi/master
Browse files Browse the repository at this point in the history
Prevent the bootWidgets() from being executed before middlewares checks
  • Loading branch information
nWidart committed Dec 1, 2018
2 parents 0a7fc6c + a7bb288 commit 9c2b374
Showing 1 changed file with 6 additions and 1 deletion.
Expand Up @@ -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);
});
}

/**
Expand Down

0 comments on commit 9c2b374

Please sign in to comment.