mirror of
https://github.com/flarum/framework.git
synced 2024-11-25 09:41:49 +08:00
Fix UpdateServiceProvider
- Shorten registration of routes - Do not resolve view factory before booting
This commit is contained in:
parent
0e5f334a0b
commit
9fe671c9bb
|
@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue
Block a user