laraveljutsu/zap
Zap is a Laravel scheduling package to manage availabilities, appointments, blocked times, and custom schedules for any resource (doctors, rooms, employees). Query availability, prevent overlaps, and build booking, shift, or shared space workflows.
Strengths:
noOverlap(), maxDuration()).patient_id, organizer), enabling downstream integrations (e.g., CRM, billing).getBookableSlots() and isBookableAtTime() are optimized for performance, critical for UI responsiveness in booking flows.Weaknesses:
Stack Compatibility:
Migration Path:
composer require, php artisan migrate), with minimal config changes for default use cases.Availability, Appointment, Blocked), but schema alignment may need custom scripts.Critical Risks:
config('app.timezone')).schedulable_id, type, and date fields).Mitigation Strategies:
schedulable_id, type, and start_at/end_at columns. Consider caching frequent queries (e.g., getBookableSlots()).Lock facade) for critical booking operations.Key Questions:
Zap, zap()) and publishes migrations/config.noOverlap()).getBookableSlots, createAppointment endpoints.HasSchedules trait on the model and test core flows (availability, booking, conflicts).availability().appointment().blocked().// Example: Convert old appointments to Zap appointments
foreach ($legacyAppointments as $appointment) {
Zap::for($doctor)
->named($appointment->title)
->appointment()
->from($appointment->date)
->addPeriod($appointment->start_time, $appointment->end_time)
->withMetadata($appointment->metadata)
->save();
}
Zap\Models\Schedule and Zap\Models\SchedulePeriod.uuid() instead of bigIncrements().metadata['invoice_id']).composer require laraveljutsu/zap
php artisan vendor:publish --provider="Zap\ZapServiceProvider" --tag="zap-migrations"
php artisan vendor:publish --provider="Zap\ZapServiceProvider" --tag="zap-config"
config/zap.php (timezones, buffer minutes, conflict rules).HasSchedules trait to resource models (e.g., Doctor, Room).php artisan migrate
maxDuration()).How can I help you explore Laravel packages today?