argument('action-id'); $action = ProductAction::find($actionId); if (!$action) { $this->error("Action with ID {$actionId} not found."); return 1; } if ($this->option('enable')) { $action->enabled = true; $status = 'enabled'; } elseif ($this->option('disable')) { $action->enabled = false; $status = 'disabled'; } else { $action->enabled = !$action->enabled; $status = $action->enabled ? 'enabled' : 'disabled'; } $action->save(); $this->info("Action #{$action->id} ({$action->action_class}) has been {$status}."); return 0; } }