Fix UpdateServiceProvider

- Shorten registration of routes
- Do not resolve view factory before booting
This commit is contained in:
Franz Liedke 2018-12-19 22:17:44 +01:00
parent 0e5f334a0b
commit 9fe671c9bb
No known key found for this signature in database
GPG Key ID: 9A0231A879B055F4

View File

@ -23,10 +23,10 @@ class UpdateServiceProvider extends AbstractServiceProvider
public function register() public function register()
{ {
$this->app->singleton('flarum.update.routes', function () { $this->app->singleton('flarum.update.routes', function () {
return new RouteCollection; $routes = new RouteCollection;
$this->populateRoutes($routes);
return $routes;
}); });
$this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.update');
} }
/** /**
@ -34,7 +34,7 @@ class UpdateServiceProvider extends AbstractServiceProvider
*/ */
public function boot() public function boot()
{ {
$this->populateRoutes($this->app->make('flarum.update.routes')); $this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.update');
} }
/** /**