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
1313{
1414 public function boot ()
1515 {
16- $ this ->app ->singleton (Manager::class);
16+ $ this ->bindManagerSingleton ();
17+ $ this ->registerCommands ();
18+ $ this ->publishConfig ();
19+ $ this ->registerBladeComponent ();
20+ }
1721
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+ {
1831 if ($ this ->app ->runningInConsole ()) {
1932 $ this ->commands ([
2033 Install::class,
2134 ]);
2235 }
36+ }
2337
38+ public function publishConfig ()
39+ {
2440 $ this ->publishes ([
2541 __DIR__ . '/../config/torchlight.php ' => config_path ('torchlight.php ' )
2642 ], 'config ' );
43+ }
2744
45+ public function registerBladeComponent ()
46+ {
2847 if (Torchlight::config ('torchlight.blade_components ' )) {
2948 $ this ->loadViewComponentsAs ('torchlight ' , [
3049 'code ' => CodeComponent::class
You can’t perform that action at this time.
0 commit comments