File tree Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Expand file tree Collapse file tree 1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -13,18 +13,37 @@ class TorchlightServiceProvider extends ServiceProvider
13
13
{
14
14
public function boot ()
15
15
{
16
- $ this ->app ->singleton (Manager::class);
16
+ $ this ->bindManagerSingleton ();
17
+ $ this ->registerCommands ();
18
+ $ this ->publishConfig ();
19
+ $ this ->registerBladeComponent ();
20
+ }
17
21
22
+ public function bindManagerSingleton ()
23
+ {
24
+ $ this ->app ->singleton (Manager::class, function () {
25
+ return new Manager ($ this ->app );
26
+ });
27
+ }
28
+
29
+ public function registerCommands ()
30
+ {
18
31
if ($ this ->app ->runningInConsole ()) {
19
32
$ this ->commands ([
20
33
Install::class,
21
34
]);
22
35
}
36
+ }
23
37
38
+ public function publishConfig ()
39
+ {
24
40
$ this ->publishes ([
25
41
__DIR__ . '/../config/torchlight.php ' => config_path ('torchlight.php ' )
26
42
], 'config ' );
43
+ }
27
44
45
+ public function registerBladeComponent ()
46
+ {
28
47
if (Torchlight::config ('torchlight.blade_components ' )) {
29
48
$ this ->loadViewComponentsAs ('torchlight ' , [
30
49
'code ' => CodeComponent::class
You can’t perform that action at this time.
0 commit comments