Download the PHP package masterix21/laravel-bookings without Composer

On this page you can find all versions of the php package masterix21/laravel-bookings. 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 laravel-bookings

Laravel Bookings

Latest Version on Packagist Tests PHP Version Total Downloads

Add booking functionality to any Eloquent model. Turn your models into bookable resources with time-based reservations, capacity management, planning constraints, overlap detection, and an event-driven architecture.

Table of Contents

Features

Requirements

Requirement Version
PHP 8.3+
Laravel 12.x or 13.x

Installation

Install the package via Composer:

Publish and run the migrations:

Optionally, publish the config file:

See the installation guide for optional migrations and upgrade notes.

Upgrading

Upgrading an existing installation? See the migration guide — it covers a required data cleanup step and a foreign key behavior change before you run php artisan migrate.

Quick Start

1. Make a model bookable

Add the IsBookable trait to any model:

2. Create its bookable resource

Create the BookableResource that defines availability and capacity. To keep it in sync with your model on every save, add the optional SyncBookableResource trait.

3. Make a booking

Overlapping bookings are rejected automatically:

See the getting started guide for a full walkthrough.

Core Concepts

Concept Description
BookableResource The bookable item, linked to your model (Room, Car, …) via a polymorphic relation.
Booking A reservation with booker, metadata, and one or more time periods.
BookedPeriod An individual time slot within a booking, enabling multi-period reservations.
BookablePlanning Availability rules: working days, time windows, and constraints for a resource.

Advanced Features

Each feature below is summarized here and documented in full under docs/.

Booking lifecycle callbacks

Hook custom logic before and after a booking is persisted with onBookingSaving() and onBookingSaved() — useful for multi-tenancy, logging, or side effects. → docs/actions.md

Custom resource synchronization

Add the SyncBookableResource trait and implement syncBookableResource() to push data from your model (visibility, capacity, availability) into its BookableResource automatically on save. → docs/synchronization.md

Planning source pattern

Add the SyncBookablePlanning trait so a business model (rate, special offer, seasonal rule) becomes the single source of truth for a resource's availability, with bidirectional navigation between source and planning. → docs/synchronization.md

Related bookings

Link bookings with parent-child relationships (room + parking, appointment + follow-up). Each booking keeps an independent lifecycle, and children survive parent deletion. Requires an optional migration. → docs/related-bookings.md

Planning constraints

Define when a resource can be booked through BookablePlanning records — available weekdays plus starts_at/ends_at windows. → docs/models.md

Events

The booking lifecycle emits events (BookingInProgress, BookingCompleted, BookingFailed, BookingChanging, BookingChanged, BookingChangeFailed) for audit trails and integrations. → docs/events.md

Checking availability

Documentation

Guide Description
Getting Started Step-by-step quick start
Installation Installation and optional migrations
Configuration Configurable models and generators
Architecture Package design and structure
Models Model relationships and usage
Actions Core booking operations
Synchronization Resource and planning synchronization
Events Event system and listeners
Database Schema Tables and migrations
API Reference Complete API documentation
Migration Guide Upgrading between versions
Extending Customization and extension points
Troubleshooting Common issues and solutions

Examples

Testing

See docs/testing.md for testing strategies.

Contributing & Credits

Created and maintained by Luca Longo and all contributors.

License

The MIT License (MIT). See the License File for details.


All versions of laravel-bookings with dependencies

PHP Build Version
Package Version
Requires php Version ^8.3
illuminate/contracts Version ^12.0 || ^13.0
kirschbaum-development/eloquent-power-joins Version ^4.2
nesbot/carbon Version ^3.8
spatie/laravel-package-tools Version ^1.92
spatie/period Version ^2.4
staudenmeir/belongs-to-through Version ^2.16
staudenmeir/eloquent-has-many-deep Version ^1.20
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 masterix21/laravel-bookings contains the following files

Loading the files please wait ...