3
3
namespace Qirolab \Theme ;
4
4
5
5
use Facade \IgnitionContracts \SolutionProviderRepository ;
6
- use Illuminate \Container \Container ;
6
+ // use Illuminate\Container\Container;
7
7
use Illuminate \Contracts \Container \BindingResolutionException ;
8
8
use Illuminate \Support \ServiceProvider ;
9
9
use Qirolab \Theme \Commands \MakeThemeCommand ;
@@ -15,19 +15,13 @@ public function boot(): void
15
15
{
16
16
if ($ this ->app ->runningInConsole ()) {
17
17
$ this ->publishes ([
18
- __DIR__ . '/../config/theme.php ' => config_path ('theme.php ' ),
18
+ __DIR__ . '/../config/theme.php ' => config_path ('theme.php ' ),
19
19
], 'config ' );
20
20
21
21
$ this ->commands ([
22
22
MakeThemeCommand::class,
23
23
]);
24
24
}
25
-
26
- $ this ->mergeConfig ();
27
-
28
- $ this ->registerThemeFinder ();
29
-
30
- $ this ->registerSolutionProvider ();
31
25
}
32
26
33
27
public function register ()
@@ -41,7 +35,7 @@ public function register()
41
35
42
36
protected function mergeConfig (): void
43
37
{
44
- $ this ->mergeConfigFrom (__DIR__ . '/../config/theme.php ' , 'theme ' );
38
+ $ this ->mergeConfigFrom (__DIR__ . '/../config/theme.php ' , 'theme ' );
45
39
}
46
40
47
41
protected function registerSolutionProvider (): void
@@ -59,14 +53,18 @@ protected function registerSolutionProvider(): void
59
53
protected function registerThemeFinder (): void
60
54
{
61
55
$ this ->app ->singleton ('theme.finder ' , function ($ app ) {
56
+ $ themeFinder = new ThemeViewFinder (
57
+ $ app ['files ' ],
58
+ $ app ['config ' ]['view.paths ' ]
59
+ );
60
+
62
61
// $themeFinder = new ThemeViewFinder(
63
- // $app[ 'files'] ,
64
- // $app[ 'config'] ['view.paths']
62
+ // Container::getInstance()->make( 'files') ,
63
+ // Container::getInstance()->make( 'config') ['view.paths']
65
64
// );
66
65
67
- $ themeFinder = new ThemeViewFinder (
68
- Container::getInstance ()->make ('files ' ),
69
- Container::getInstance ()->make ('config ' )['view.paths ' ]
66
+ $ themeFinder ->setHints (
67
+ $ this ->app ->make ('view ' )->getFinder ()->getHints ()
70
68
);
71
69
72
70
return $ themeFinder ;
0 commit comments