From 24fd2f32c72c5913c8b36a1911d0f92864e56d42 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(). --- src/Install/InstallServiceProvider.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Install/InstallServiceProvider.php b/src/Install/InstallServiceProvider.php index 321e29058..27867022d 100644 --- a/src/Install/InstallServiceProvider.php +++ b/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')); }