option('days') ?? config('audit.retention_days', 395)); $cutoff = Carbon::now()->subDays($days); $count = AuditLog::query()->where('created_at', '<', $cutoff)->delete(); $this->info("Pruned {$count} audit log rows older than {$days} days."); return self::SUCCESS; } }