option('dry-run'); if ($dryRun) { $this->warn('DRY RUN MODE - No keys will be revoked'); $this->newLine(); // Count keys that would be cleaned up $count = \Mod\Api\Models\ApiKey::gracePeriodExpired() ->whereNull('deleted_at') ->count(); if ($count === 0) { $this->info('No API keys with expired grace periods found.'); } else { $this->info("Would revoke {$count} API key(s) with expired grace periods."); } return Command::SUCCESS; } $this->info('Cleaning up API keys with expired grace periods...'); $count = $service->cleanupExpiredGracePeriods(); if ($count === 0) { $this->info('No API keys with expired grace periods found.'); } else { $this->info("Revoked {$count} API key(s) with expired grace periods."); } return Command::SUCCESS; } }