$data */ protected function handleRecordCreation(array $data): Model { try { $booking = app(CreateReservation::class)->handle( Property::findOrFail($data['property_id']), new StayRequest( CarbonImmutable::parse($data['arrival']), CarbonImmutable::parse($data['departure']), (int) $data['guests'], promoCode: $data['promo_code'] ?: null, ), Arr::only($data, ['first_name', 'last_name', 'email', 'phone', 'street', 'postal_code', 'city']), source: 'manual', sendMails: $data['send_mails'], ); if ($data['confirm_immediately']) { app(ConfirmBooking::class)->handle($booking, notifyGuest: $data['send_mails']); } } catch (QuoteException|ReservationException $exception) { Notification::make()->title('Buchung nicht möglich')->body($exception->getMessage())->danger()->send(); $this->halt(); } $booking->update(['internal_notes' => $data['internal_notes'] ?: null]); return $booking; } protected function getRedirectUrl(): string { return BookingResource::getUrl('view', ['record' => $this->getRecord()]); } }