info('Auto-close is disabled (ticketing.auto_close_days = 0).'); return 0; } $cutoff = now()->subDays($days); $count = Ticket::where('status', 'resolved') ->where('updated_at', '<=', $cutoff) ->update(['status' => 'closed']); $this->info("Auto-closed {$count} ticket(s) resolved more than {$days} day(s) ago."); return 0; } }