Schedule Patterns
Biweekly
biweekly() — every 2 weeks on specific weekdays.
Biweekly
Schedule runs every 2 weeks on the given weekdays. The week of the schedule’s start date (or the optional anchor) is the first occurrence.
$schedule = Zap::for($doctor)
->named('Office Hours')
->availability();
// Bi-weekly (week of the start date by default, optional anchor)
$schedule->biweekly(['tuesday', 'thursday'])
->from('2025-01-07')
->to('2025-03-31');
Use from()/to() or forYear() and addPeriod() as needed, then save().
For intervals of 3 to 52 weeks, use the dynamic weekly methods: Every X weeks (everyThreeWeeks, everyFourWeeks, … everyFiftyTwoWeeks).
