diff --git a/app/Console/Commands/ImportHtmlCommand.php b/app/Console/Commands/ImportHtmlCommand.php index 7ca527b..0f56f6f 100644 --- a/app/Console/Commands/ImportHtmlCommand.php +++ b/app/Console/Commands/ImportHtmlCommand.php @@ -38,6 +38,9 @@ public function handle() exit(Command::FAILURE); } + Paraphrase::truncate(); + $this->warn('All paraphrases deleted.'); + $files = File::glob(storage_path('sources/*.html')); foreach($files as $file) { @@ -120,9 +123,6 @@ private function createEditors(array $contentRows): Collection */ private function createParaphrases(array $contentRows, Collection $editors): void { - Paraphrase::truncate(); - $this->warn('All paraphrases deleted.'); - $rows = count(data_get($contentRows, 'editor', [])); $this->info('Creating new paraphrases'); $bar = new ProgressBar($this->output, $rows);