/** * Execute the console command. * * @return mixed */ public function fire() { $name = $this->argument('name'); $text = $this->argument('text'); $createCategory = $this->notifynderCategory->add($name, $text); if ($createCategory) { $this->info("Category {$createCategory->name} has been created"); } else { $this->error('The category has been not created'); } }
/** * Execute the console command. * * @return mixed */ public function fire() { $indentifier = $this->argument('identifier'); if ($this->isIntegerValue($indentifier)) { $delete = $this->notifynderCategory->delete($indentifier); } else { $delete = $this->notifynderCategory->deleteByName($indentifier); } if ($delete) { $this->info('Category has been deleted'); } else { $this->error('Category Not found'); } }