Exemplo n.º 1
0
 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $indexName = $this->option('index') ?: $this->indexManager->getDefaultIndex();
     $force = $this->option('force') ? true : false;
     if ($force || $this->confirm("Do you really want to delete the index '{$indexName}' ? [y|N]")) {
         $this->indexManager->deleteIndex($indexName);
         $this->info("Index '{$indexName}' successfully deleted.");
     }
 }
Exemplo n.º 2
0
 /**
  * Reset (delete) an existing index.
  *
  * @param  string $indexName
  * @return void
  */
 protected function resetIndex($indexName)
 {
     $this->indexManager->deleteIndex($indexName);
 }