1- <?php
2-
3- namespace EvolutionCMS \Providers ;
1+ <?php namespace EvolutionCMS \Providers ;
42
53use BladeUI \Icons \Factory ;
64use BladeUI \Icons \IconsManifest ;
@@ -31,7 +29,7 @@ public function boot(): void
3129
3230 private function registerConfig (): void
3331 {
34- $ this ->mergeConfigFrom (__DIR__ . '/../../../core/ config/blade-icons.php ' , 'blade-icons ' );
32+ $ this ->mergeConfigFrom (EVO_CORE_PATH . 'config/blade-icons.php ' , 'blade-icons ' );
3533 }
3634
3735 private function registerFactory (): void
@@ -77,6 +75,10 @@ private function bootIconComponent(): void
7775 {
7876 // Register icon component without Application type-hint
7977 $ this ->callAfterResolving (ViewFactory::class, function ($ view ) {
78+ if (!is_file ($ this ->manifestPath ())) {
79+ return ;
80+ }
81+
8082 $ this ->app ->make (Factory::class)->registerComponents ();
8183 });
8284 }
@@ -85,7 +87,7 @@ private function bootPublishing(): void
8587 {
8688 if ($ this ->app ->runningInConsole ()) {
8789 $ this ->publishes ([
88- __DIR__ . '/../../../core/ config/blade-icons.php ' => $ this ->app ->configPath ('blade-icons.php ' ),
90+ EVO_CORE_PATH . 'config/blade-icons.php ' => $ this ->app ->configPath ('blade-icons.php ' ),
8991 ], 'blade-icons-config ' );
9092 }
9193 }
@@ -95,4 +97,3 @@ private function manifestPath(): string
9597 return $ this ->app ->bootstrapPath ('cache/blade-icons.php ' );
9698 }
9799}
98-
0 commit comments