Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
bangnokia committed Mar 23, 2024
1 parent 91f3562 commit de9e9f8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/Commands/CleanCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,13 @@ public function handle(): int
{
$finder = new Finder();

$finder->files()->in(getcwd() . '/public')->name('*.html');
$finder->in(getcwd() . '/public')->ignoreVCS(true);

foreach ($finder as $file) {
unlink($file->getRealPath());
foreach ($finder as $item) {
if ($item->isFile()) {
unlink($item->getRealPath());
unset($item);
}
}

$this->info('Cleaned the public directory');
Expand Down

0 comments on commit de9e9f8

Please sign in to comment.