cheesytech / booking
A flexible and powerful booking system for Laravel applications
v1.3.0
2026-10-25 15:37 UTC
Requires
- php: ^8.2
- laravel/framework: ^10.0 || ^11.0 || ^12.0 || ^13.0
- nesbot/carbon: ^2.0 || ^3.0
- spatie/laravel-package-tools: ^1.92
Requires (Dev)
- barryvdh/laravel-ide-helper: ^3.0
- ergebnis/composer-normalize: ^2.43
- laravel/pint: ^1.0
- mockery/mockery: ^1.5
- nunomaduro/collision: ^7.0|^8.0
- orchestra/testbench: ^8.0|^9.0|^10.0|^11.0
- phpunit/phpunit: ^10.0|^11.0|^12.0
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
Laravel Booking
A flexible and powerful booking system for Laravel.
cheesytech/booking adds a polymorphic booking/reservation layer to any Laravel app: book any resource for any actor, with status tracking, overlap rules, business-hours validation, and cross-database duration scopes.
Quick Start
composer require cheesytech/booking php artisan package:install cheesytech/booking php artisan migrate
$booking = new Booking(); $booking->bookable()->associate($room); // resource being booked $booking->bookerable()->associate($user); // actor making the booking $booking->start_time = Carbon::tomorrow()->setHour(10); $booking->end_time = Carbon::tomorrow()->setHour(11); $booking->status = 'pending'; $booking->save(); $booking->changeStatus('confirmed', 'Approved by admin');
Key Features
- Polymorphic bookings — book any
Bookableresource for anyBookerableactor. - Overlap prevention — automatic conflict checks, with min-interval and max-duration limits.
- Custom rules — extend validation via the
OverlapRuleinterface (built-inBusinessHoursRule). - Status tracking — configurable statuses with full history and metadata.
- Event-driven —
BookingCreated,BookingUpdated,BookingDeleted,BookingStatusChanged. - Cross-database duration scopes —
durationLongerThan,durationBetween, … on MySQL, PostgreSQL, SQLite, SQL Server. - Publishable config and migration, with model factories for testing.
Requirements
- PHP 8.2+
- Laravel 10, 11, 12, or 13
- Carbon 2.0+
Documentation
| Guide | Description |
|---|---|
| Getting Started | Installation, model setup, first booking |
| Configuration | Statuses, overlap rules, events in config/booking.php |
| Architecture | Traits, interfaces, schema, extension points |
| Usage | Query scopes, status management, custom rules, events |
| Testing | Factories and PHPDoc regeneration |
| Contributing | How to contribute |
License
The Laravel Booking package is open-sourced software licensed under the MIT license.