From c20dcfe4e7724f4fbc2fff1dc19fa087f5613692 Mon Sep 17 00:00:00 2001 From: Franz Liedke Date: Wed, 25 Apr 2018 00:05:12 +0200 Subject: [PATCH] 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(). --- framework/core/src/Install/InstallServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/framework/core/src/Install/InstallServiceProvider.php b/framework/core/src/Install/InstallServiceProvider.php index 321e29058..27867022d 100644 --- a/framework/core/src/Install/InstallServiceProvider.php +++ b/framework/core/src/Install/InstallServiceProvider.php @@ -53,8 +53,6 @@ class InstallServiceProvider extends AbstractServiceProvider $this->app->singleton('flarum.install.routes', function () { return new RouteCollection; }); - - $this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.install'); } /** @@ -62,6 +60,8 @@ class InstallServiceProvider extends AbstractServiceProvider */ public function boot() { + $this->loadViewsFrom(__DIR__.'/../../views/install', 'flarum.install'); + $this->populateRoutes($this->app->make('flarum.install.routes')); }