subDays($days); $snapshots = ApSnapshot::where('captured_at', '<', $cutoff)->delete(); $clientSnapshots = ClientSnapshot::where('captured_at', '<', $cutoff)->delete(); $webhookLogs = WebhookLog::where('fired_at', '<', $cutoff)->delete(); $this->info("Cleaned up: {$snapshots} AP snapshots, {$clientSnapshots} client snapshots, {$webhookLogs} webhook logs older than {$days} days."); return self::SUCCESS; } }