each(function (Tenant $tenant) use ($confirmBooking): void { $sent = 0; $failed = Booking::query() ->whereIn('status', BookingStatus::occupying()) ->whereNotNull('confirmation_failed_at') ->where('confirmation_failed_at', '>=', now()->subDays(3)) ->whereNull('confirmation_sent_at') ->get(); foreach ($failed as $booking) { $sent += $confirmBooking->resend($booking) ? 1 : 0; } $this->info("{$tenant->name}: {$sent} von {$failed->count()} Bestätigung(en) nachgesendet."); }); return self::SUCCESS; } }