Download the PHP package laraveljutsu/zap without Composer

On this page you can find all versions of the php package laraveljutsu/zap. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package zap

**Flexible schedule management for modern Laravel applications** [![PHP Version](https://img.shields.io/badge/PHP-%E2%89%A48.5-777BB4?style=for-the-badge&logo=php)](https://www.php.net/) [![Laravel Version](https://img.shields.io/badge/Laravel-%E2%89%A412.0-FF2D20?style=for-the-badge&logo=laravel)](https://laravel.com) [![License](http://poser.pugx.org/laraveljutsu/zap/license?style=for-the-badge)](https://packagist.org/packages/laraveljutsu/zap) [![Total Downloads](http://poser.pugx.org/laraveljutsu/zap/downloads?style=for-the-badge)](https://packagist.org/packages/laraveljutsu/zap) [![Why PHP](https://img.shields.io/badge/Why_PHP-in_2026-7A86E8?style=for-the-badge&labelColor=18181b)](https://whyphp.dev) [Website](https://ludovicguenet.dev) β€’ [Documentation](https://laravel-zap.com) β€’ [Support](mailto:[email protected])

Table of contents


🎯 What is Zap?

Zap is a calendar and scheduling package for Laravel. Define availabilities, appointments, blocked times, and custom schedules for any resource (doctors, rooms, employees, etc.).

Use cases: appointment booking, healthcare resources, employee shifts, shared space booking.


πŸ“¦ Installation

Requirements: PHP β‰₯8.5 β€’ Laravel β‰₯12.0

UUIDs/ULIDs: If your app uses non-integer primary keys, read Custom model support before migrating. You may need to change migrations and config.

Make a model schedulable: add the HasSchedules trait.


🧩 Core concepts

Type Purpose Overlaps
Availability When a resource can be booked Allowed
Appointment Bookings / scheduled events Exclusive
Blocked When booking is forbidden Exclusive
Custom Your rules (overlap, etc.) You define

πŸš€ Quick start

πŸ’‘ Use the zap() helper instead of the facade when you prefer: zap()->for($doctor)->...


πŸ“… Schedule patterns

Recurrence at a glance

Pattern Method / example
Daily daily()
Weekly (days) weekly(['monday', 'friday'])
Weekly + period weekDays(['monday', 'friday'], '09:00', '17:00')
Odd/even weeks weeklyOdd(), weeklyEven() (+ weekOddDays / weekEvenDays)
Bi-weekly biweekly(['tuesday'], $startsOn?)
Monthly (dates) monthly(['days_of_month' => [1, 15]])
Bi-monthly / quarter / semi / annual bimonthly(), quarterly(), semiannually(), annually() + config
Ordinal weekday firstWednesdayOfMonth(), secondFridayOfMonth(), lastMondayOfMonth()
Every N weeks everyThreeWeeks(), … everyFiftyTwoWeeks()
Every N months everyFourMonths(), … everyElevenMonths()

Recurrence examples

Daily & weekly

Monthly (by day of month)

Monthly ordinal weekday (1st, 2nd, 3rd, 4th, or last weekday of the month)

Dynamic intervals

Date ranges

Time periods


πŸ” Query & check availability

Need Method
Any bookable slot today? $model->isBookableAt('2025-01-15', 60)
Time range bookable? $model->isBookableAtTime('2025-01-15', '09:00', '09:30')
Time range bookable (custom slot)? $model->isBookableAtTime('2025-01-15', '09:30', '10:00', null, 30)
Time range bookable (custom slot + buffer)? $model->isBookableAtTime('2025-01-15', '09:45', '10:15', null, 30, 15)
List bookable slots $model->getBookableSlots('2025-01-15', 60, 15)
Next bookable slot $model->getNextBookableSlot('2025-01-15', 60, 15)
Conflicts for a schedule Zap::findConflicts($schedule) / Zap::hasConflicts($schedule)
Schedules on a date $model->schedulesForDate('2025-01-15')->get()
Schedules in range $model->schedulesForDateRange('2025-01-01', '2025-01-31')->get()
By type $model->appointmentSchedules(), availabilitySchedules(), blockedSchedules()
Schedule type checks $schedule->isAvailability(), isAppointment(), isBlocked()

⚠️ isAvailableAt() is deprecated. Prefer isBookableAt(), isBookableAtTime(), and getBookableSlots().


πŸ’Ό Real-world examples

Doctor

Meeting room

Employee (with vacation)


βš™οΈ Configuration

Publish assets:

Important keys in config/zap.php: time_slots.buffer_minutes, default_rules.no_overlap, conflict_detection, validation.


πŸ›‘οΈ Advanced features

Custom schedules & rules

Metadata

Validation rules: noOverlap(), allowOverlap(), workingHoursOnly('09:00', '17:00'), maxDuration(120), noWeekends().

Custom model support (UUIDs)

If your app uses UUIDs/ULIDs for primary keys:

  1. Models β€” Extend Zap\Models\Schedule and Zap\Models\SchedulePeriod, add Laravel’s HasUuids trait. Add HasUuids to your schedulable model (e.g. Doctor) as well.
  2. Config β€” In config/zap.php, set models.schedule and models.schedule_period to your extended classes.
  3. Migrations β€” After publishing, change id() to uuid('id')->primary(), morphs('schedulable') to uuidMorphs('schedulable'), and foreignId('schedule_id') to foreignUuid('schedule_id') in the schedules and schedule_periods tables.

Do this before running migrations.


🧠 AI agent support

Zap provides Laravel Boost 2.0 skills. With Boost installed, agents get accurate knowledge of the API.

Skill Contents
zap-schedules Types, builder API, validation, conflict detection
zap-availability Bookable slots, availability checks, querying
zap-recurrence All recurrence patterns (daily, weekly, odd/even, monthly, ordinal weekday, dynamic)

No extra configuration.


🀝 Contributing

Contributions are welcome. Use PSR-12 and add tests.


πŸ“„ License

MIT License.

πŸ”’ Security

Report issues to [email protected] (not the public issue tracker).


**Made with πŸ’› by [Ludovic GuΓ©net](https://www.ludovicguenet.dev) for the Laravel community**

All versions of zap with dependencies

PHP Build Version
Package Version
Requires php Version >=8.3 <8.6
ext-intl Version *
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package laraveljutsu/zap contains the following files

Loading the files please wait ...