1
0
mirror of https://github.com/flarum/core.git synced 2025-07-20 08:11:27 +02:00

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() 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');
} }
/** /**