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 428b2f07e8
commit c0a51b340b

View File

@ -23,10 +23,10 @@ class UpdateServiceProvider extends AbstractServiceProvider
public function register()
{
$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()
{
$this->populateRoutes($this->app->make('flarum.update.routes'));
$this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.update');
}
/**