resources/boost/skills/zap-schedules/SKILL.md
# Laravel Zap - Schedule Management Laravel Zap is a comprehensive calendar and scheduling system for Laravel. This skill covers schedule creation, types, and the fluent builder API. ## Installation ```bash composer require laraveljutsu/zap php artisan vendor:publish --provider="Zap\ZapServiceProvider" php artisan migrate ``` ## Model Setup Add the `HasSchedules` trait to any Eloquent model you want to make schedulable: ```php use Zap\Models\Concerns\HasSchedules; class Doctor extends Mod
npx skillsauth add ludoguenet/laravel-zap resources/boost/skills/zap-schedulesInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Laravel Zap is a comprehensive calendar and scheduling system for Laravel. This skill covers schedule creation, types, and the fluent builder API.
composer require laraveljutsu/zap
php artisan vendor:publish --provider="Zap\ZapServiceProvider"
php artisan migrate
Add the HasSchedules trait to any Eloquent model you want to make schedulable:
use Zap\Models\Concerns\HasSchedules;
class Doctor extends Model
{
use HasSchedules;
}
Zap uses four schedule types:
| Type | Purpose | Overlap behavior | |------|---------|------------------| | Availability | Define when resources can be booked | Allows overlaps | | Appointment | Actual bookings or scheduled events | Exclusive — no overlaps allowed | | Blocked | Periods where booking is forbidden | Exclusive — no overlaps allowed | | Custom | Neutral schedules with explicit rules | You define the rules |
Use the Zap facade or zap() helper with the fluent builder:
use Zap\Facades\Zap;
// Define availability (working hours)
Zap::for($doctor)
->named('Office Hours')
->availability()
->forYear(2025)
->addPeriod('09:00', '12:00')
->addPeriod('14:00', '17:00')
->weekly(['monday', 'tuesday', 'wednesday', 'thursday', 'friday'])
->save();
// Block time (lunch break)
Zap::for($doctor)
->named('Lunch Break')
->blocked()
->forYear(2025)
->addPeriod('12:00', '13:00')
->weekly(['monday', 'tuesday', 'wednesday', 'thursday', 'friday'])
->save();
// Create appointment
Zap::for($doctor)
->named('Patient A - Consultation')
->appointment()
->from('2025-01-15')
->addPeriod('10:00', '11:00')
->withMetadata(['patient_id' => 1, 'type' => 'consultation'])
->save();
// Custom schedule with explicit overlap rules
Zap::for($user)
->named('Custom Event')
->custom()
->from('2025-01-15')
->addPeriod('15:00', '16:00')
->noOverlap()
->save();
Recurrence is set via methods such as daily(), weekly(['monday', 'friday']), monthly(['days_of_month' => [1, 15]]), and ordinal weekday: firstWednesdayOfMonth(), secondFridayOfMonth(), lastMondayOfMonth() (see zap-recurrence skill for all patterns).
$schedule->from('2025-01-15'); // Single date
$schedule->on('2025-01-15'); // Alias for from()
$schedule->from('2025-01-01')->to('2025-12-31'); // Date range
$schedule->between('2025-01-01', '2025-12-31'); // Alternative syntax
$schedule->forYear(2025); // Entire year shortcut
// Single period
$schedule->addPeriod('09:00', '17:00');
// Multiple periods (split shifts)
$schedule->addPeriod('09:00', '12:00');
$schedule->addPeriod('14:00', '17:00');
// Multiple periods at once
$schedule->addPeriods([
['start_time' => '09:00', 'end_time' => '12:00'],
['start_time' => '14:00', 'end_time' => '17:00'],
]);
Attach custom data to schedules:
->withMetadata([
'patient_id' => 1,
'type' => 'consultation',
'notes' => 'Follow-up required'
])
// Prevent overlapping schedules
->noOverlap()
// Allow overlapping (explicit)
->allowOverlap()
// Restrict to working hours
->workingHoursOnly('09:00', '17:00')
// Maximum duration
->maxDuration(120) // 120 minutes
// No weekends
->noWeekends()
// Create inactive schedule
->inactive()
// Explicitly set as active (default)
->active()
use Zap\Facades\Zap;
// Find conflicts for a schedule
$conflicts = Zap::findConflicts($schedule);
// Check if schedule has conflicts
$hasConflicts = Zap::hasConflicts($schedule);
// Check via model
$hasConflict = $doctor->hasScheduleConflict($schedule);
$conflicts = $doctor->findScheduleConflicts($schedule);
$schedule->isAvailability(); // Check if availability type
$schedule->isAppointment(); // Check if appointment type
$schedule->isBlocked(); // Check if blocked type
$schedule->isCustom(); // Check if custom type
$schedule->preventsOverlaps(); // Check if prevents overlaps
$schedule->allowsOverlaps(); // Check if allows overlaps
$schedule->isActiveOn($date); // Check if active on date
$schedule->total_duration; // Get total duration in minutes
Key settings in config/zap.php:
'default_rules' => [
'no_overlap' => [
'enabled' => true,
'applies_to' => ['appointment', 'blocked'],
],
],
'conflict_detection' => [
'enabled' => true,
'buffer_minutes' => 0,
],
'time_slots' => [
'buffer_minutes' => 0,
],
'validation' => [
'require_future_dates' => true,
'max_date_range' => 365,
'min_period_duration' => 15,
'max_periods_per_schedule' => 50,
],
testing
# Laravel Zap - Recurrence Patterns This skill covers all recurrence patterns available in Laravel Zap for creating recurring schedules. ## Available Frequencies | Frequency | Description | |-----------|-------------| | `daily` | Every day | | `weekly` | Specific days each week | | `weekly_odd` | Specific days on odd-numbered weeks | | `weekly_even` | Specific days on even-numbered weeks | | `biweekly` | Every two weeks | | `monthly` | Specific days each month | | `bimonthly` | Every two mont
testing
# Laravel Zap - Availability & Bookable Slots This skill covers checking availability, retrieving bookable slots, and querying schedules in Laravel Zap. ## Checking Bookability ### Check if Bookable on a Date ```php // Check if there is at least one bookable slot on the day // Parameters: date, slot duration in minutes $isBookable = $doctor->isBookableAt('2025-01-15', 60); // With buffer time (minutes between slots) $isBookable = $doctor->isBookableAt('2025-01-15', 60, 15); ``` ### Check S
development
Maintainer-only workflow for handling GitHub Secret Scanning alerts on OpenClaw. Use when Codex needs to triage, redact, clean up, and resolve secret leakage found in issue comments, issue bodies, PR comments, or other GitHub content.
development
Maintainer workflow for OpenClaw releases, prereleases, changelog release notes, and publish validation. Use when Codex needs to prepare or verify stable or beta release steps, align version naming, assemble release notes, check release auth requirements, or validate publish-time commands and artifacts.