@@ -23,18 +23,6 @@ public function boot()
2323 {
2424 $ this ->registerNamespaces ();
2525
26- $ this ->app ->singleton (
27- ModuleManifest::class,
28- fn () => new ModuleManifest (
29- new Filesystem ,
30- app (Contracts \RepositoryInterface::class)->getScanPaths (),
31- $ this ->getCachedModulePath (),
32- app (ActivatorInterface::class)
33- )
34- );
35-
36- $ this ->registerModules ();
37-
3826 AboutCommand::add ('Laravel-Modules ' , [
3927 'Version ' => fn () => InstalledVersions::getPrettyVersion ('nwidart/laravel-modules ' ),
4028 ]);
@@ -58,6 +46,8 @@ public function register()
5846 $ this ->registerTranslations ();
5947
6048 $ this ->mergeConfigFrom (__DIR__ .'/../config/config.php ' , 'modules ' );
49+
50+ $ this ->registerModules ();
6151 }
6252
6353 /**
@@ -98,6 +88,17 @@ protected function registerServices()
9888 return new $ class ($ app );
9989 });
10090 $ this ->app ->alias (Contracts \RepositoryInterface::class, 'modules ' );
91+
92+ $ this ->app ->singleton (
93+ ModuleManifest::class,
94+ fn () => new ModuleManifest (
95+ new Filesystem ,
96+ app (Contracts \RepositoryInterface::class)->getScanPaths (),
97+ $ this ->getCachedModulePath (),
98+ app (ActivatorInterface::class)
99+ )
100+ );
101+
101102 }
102103
103104 protected function registerMigrations (): void
0 commit comments