Skip to content

Commit c6fe5fb

Browse files
committed
Changelog:
- Added: cleaning symbolic links.
1 parent 7c648ec commit c6fe5fb

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

app/Console/Commands/ModuleSymlinkCommand.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
use App\Services\ModulesService;
66
use Illuminate\Console\Command;
7+
use Illuminate\Support\Facades\Storage;
78

89
class ModuleSymlinkCommand extends Command
910
{
@@ -36,6 +37,12 @@ public function handle()
3637
} else {
3738
$modules = $moduleService->get();
3839

40+
/**
41+
* let's clear all existing links
42+
*/
43+
Storage::disk( 'ns' )->deleteDirectory( 'public/modules' );
44+
Storage::disk( 'ns' )->makeDirectory( 'public/modules' );
45+
3946
$this->withProgressBar( $modules, function( $module ) use ( $moduleService ) {
4047
$moduleService->createSymLink( $module[ 'namespace' ] );
4148
});

0 commit comments

Comments
 (0)