lockForTransition(); if ($booking->status === BookingStatus::Declined && $booking->declined_by === 'guest') { return false; } if (! in_array($booking->status, BookingStatus::holding(), true)) { throw ReservationException::invalidTransition($booking->status->getLabel(), 'freigegeben'); } $booking->update(['status' => BookingStatus::Declined, 'declined_by' => 'guest', 'hold_expires_at' => null]); return true; }); if ($released) { try { Mail::to(Settings::notificationRecipients())->send(new OfferAnswered($booking, accepted: false)); } catch (Throwable $exception) { Log::warning('Meldung über Freigabe nicht zugestellt', ['booking' => $booking->id, 'exception' => $exception::class]); } } return $released; } }