From bdd6e59980caa63865da6ce82ed2590c26790efd Mon Sep 17 00:00:00 2001 From: Dries Vints Date: Thu, 9 Jul 2020 22:07:58 +0200 Subject: [PATCH] Move callAfterResolving to register --- src/BladeIconsServiceProvider.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/src/BladeIconsServiceProvider.php b/src/BladeIconsServiceProvider.php index 0a5809a..5831d69 100644 --- a/src/BladeIconsServiceProvider.php +++ b/src/BladeIconsServiceProvider.php @@ -4,6 +4,7 @@ namespace BladeUI\Icons; +use Illuminate\Contracts\View\Factory as ViewFactory; use Illuminate\Filesystem\Filesystem; use Illuminate\Foundation\Application; use Illuminate\Support\Facades\Blade; @@ -19,7 +20,6 @@ public function register(): void public function boot(): void { - $this->bootComponents(); $this->bootDirectives(); $this->bootPublishing(); } @@ -44,11 +44,8 @@ private function registerFactory(): void return $factory; }); - } - private function bootComponents(): void - { - $this->callAfterResolving('view', function ($view, Application $app) { + $this->callAfterResolving(ViewFactory::class, function ($view, Application $app) { $app->make(Factory::class)->registerComponents(); }); }