Publish and customize the configuration file:
php artisan vendor:publish --tag=zap-config
Key settings in config/zap.php:
'time_slots' => [
'buffer_minutes' => 0, // Default buffer between slots
],
'default_rules' => [
'no_overlap' => [
'enabled' => true,
'applies_to' => ['appointment', 'blocked'],
],
],
Zap::for($user)->named('Custom Event')->custom()
->from('2025-01-15')->addPeriod('15:00', '16:00')
->noOverlap() // Explicitly prevent overlaps
->save();
Attach arbitrary data to any schedule:
->withMetadata([
'patient_id' => 1,
'type' => 'consultation',
'notes' => 'Follow-up required'
])