mirror of
https://github.com/flarum/framework.git
synced 2025-03-02 17:21:11 +08:00
Service Provider: Move loadViewsFrom() to boot()
This method relies on the "view" being bound in the IoC container. This is only guaranteed after all register() methods have run, thus it should be done in boot().
This commit is contained in:
parent
fc7b1bf3bd
commit
c20dcfe4e7
@ -53,8 +53,6 @@ class InstallServiceProvider extends AbstractServiceProvider
|
|||||||
$this->app->singleton('flarum.install.routes', function () {
|
$this->app->singleton('flarum.install.routes', function () {
|
||||||
return new RouteCollection;
|
return new RouteCollection;
|
||||||
});
|
});
|
||||||
|
|
||||||
$this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.install');
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -62,6 +60,8 @@ class InstallServiceProvider extends AbstractServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
|
$this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.install');
|
||||||
|
|
||||||
$this->populateRoutes($this->app->make('flarum.install.routes'));
|
$this->populateRoutes($this->app->make('flarum.install.routes'));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user