@@ -22,7 +22,9 @@ public function handle(): void
2222 $ this ->copyResourcesComponentsFiles ();
2323 $ this ->copyTranslationFile ();
2424
25- $ this ->call ('storage:link ' );
25+ if (!is_link (public_path ('storage ' ))) {
26+ $ this ->call ('storage:link ' );
27+ }
2628
2729 $ this ->call ('modular:blog-migrate ' );
2830
@@ -45,39 +47,39 @@ private function copyBlogModuleDirectory(): void
4547 {
4648 $ this ->info ('Copying Blog Module directory... ' );
4749 (new Filesystem )->ensureDirectoryExists (base_path ('modules ' ));
48- (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/modules/Blog ' , base_path ('modules/Blog ' ));
50+ (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/modules/Blog ' , base_path ('modules/Blog ' ));
4951 $ this ->info ('Blog Module directory copied successfully. ' );
5052 }
5153
5254 private function copyResourcesComponentsFiles (): void
5355 {
5456 $ this ->info ('Copying Blog Module components... ' );
5557 (new Filesystem )->ensureDirectoryExists (resource_path ('js/Components/Modules/Blog ' ));
56- (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/resources/js/Components/Modules/Blog ' , resource_path ('js/Components/Modules/Blog ' ));
58+ (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/resources/js/Components/Modules/Blog ' , resource_path ('js/Components/Modules/Blog ' ));
5759 $ this ->info ('Blog Module components copied successfully. ' );
5860 }
5961
6062 private function copyBlogSeederImages (): void
6163 {
6264 $ this ->info ('Copying Blog Seeder images... ' );
6365 (new Filesystem )->ensureDirectoryExists (resource_path ('images/blog ' ));
64- (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/resources/images/blog ' , resource_path ('images/blog ' ));
66+ (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/resources/images/blog ' , resource_path ('images/blog ' ));
6567 $ this ->info ('Blog Module Seeder images copied successfully. ' );
6668 }
6769
6870 private function copyResourcesFiles (): void
6971 {
7072 $ this ->info ('Copying Blog Module resources... ' );
7173 (new Filesystem )->ensureDirectoryExists (resource_path ('js/Pages ' ));
72- (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/resources/js/Pages ' , resource_path ('js/Pages ' ));
74+ (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/resources/js/Pages ' , resource_path ('js/Pages ' ));
7375 $ this ->info ('Blog Module resources copied successfully. ' );
7476 }
7577
7678 private function copyResourcesSiteFiles (): void
7779 {
7880 $ this ->info ('Copying Blog Module resources-site... ' );
7981 (new Filesystem )->ensureDirectoryExists (base_path ('resources-site ' ));
80- (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/resources-site ' , base_path ('resources-site ' ));
82+ (new Filesystem )->copyDirectory (__DIR__ . '/../../stubs/resources-site ' , base_path ('resources-site ' ));
8183 $ this ->info ('Blog Module resources-site copied successfully. ' );
8284 }
8385
@@ -87,7 +89,7 @@ private function copyTranslationFile(): void
8789
8890 if (! file_exists ($ paginationEnglish )) {
8991 (new Filesystem )->ensureDirectoryExists (base_path ('lang/en ' ));
90- copy (__DIR__ . '/../../stubs/lang/en/pagination.php ' , base_path ('lang/en/pagination.php ' ));
92+ copy (__DIR__ . '/../../stubs/lang/en/pagination.php ' , base_path ('lang/en/pagination.php ' ));
9193 }
9294 }
9395}
0 commit comments