All packages
Appointments for Laravel
Rescheduling
Move an appointment with Appointments::for($appointment)->reschedule(). The new start is stored in UTC, the duration is kept unless you pass a new one, and ends_at moves with it:
use Carbon\CarbonImmutable;
use RoundlyConsulting\Appointments\Facades\Appointments;
Appointments::for($appointment)->reschedule(CarbonImmutable::parse('2026-07-02 10:00'), durationMinutes: 60);
// fires AppointmentRescheduled
Appointments::for($appointment)->reschedule(
CarbonImmutable::parse('2026-07-02 14:00', 'Europe/Bratislava'),
preventConflicts: true, // keeps the current duration; never clashes with itself
);- preventConflicts: true — or prevent_conflicts in config — checks every current participant against the new slot, ignoring the appointment itself.
- With conflict prevention on, the appointment’s row and its participants’ rows are locked before the check, in the same transaction as the move — a concurrent booking can’t slip in between.
- A durationMinutes under one minute throws InvalidScheduleException before anything is written.
- AppointmentRescheduled fires with the previous start; AppointmentUpdated fires as well, from the save. Both wait for the transaction to commit.
- Prefer reschedule() to editing starts_at directly — the model’s saving hook doesn’t move an ends_at that is already set.
Reacting to a move
use Illuminate\Support\Facades\Event;
use RoundlyConsulting\Appointments\Events\AppointmentRescheduled;
Event::listen(function (AppointmentRescheduled $event): void {
$event->appointment->startsAtLocal(); // the new start
$event->previousStartsAt; // where it was before
});Show your open-source love
This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.
More ways to support, including cryptoBy donating, you agree to our donation terms.
Want this built into your product?
We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.