Download the PHP package solution-forest/bookflow without Composer
On this page you can find all versions of the php package solution-forest/bookflow. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download solution-forest/bookflow
More information about solution-forest/bookflow
Files in solution-forest/bookflow
Package bookflow
Short Description Book Flow for Laravel
License MIT
Homepage https://github.com/solutionforest/bookflow
Informations about the package bookflow
BookFlow
BookFlow is a flexible Laravel package for managing bookings and pricing strategies. It provides a robust foundation for implementing booking systems with customizable pricing calculations.
⚠️ WARNING: DEVELOPMENT STATUS⚠️
This package is currently under active development and is NOT READY FOR PRODUCTION USE.
Features may be incomplete, APIs might change, and there could be breaking changes. Use at your own risk in development environments only.
Features
- Easy booking management with support for one-time and recurring bookings
- Capacity Management - Allow multiple bookings per timeslot (default: 1 booking)
- Flexible pricing strategies (Fixed, Hourly, Daily)
- Customizable time-based pricing with configurable units and rounding
- Extensible architecture for custom pricing strategies
- Built-in conflict detection and availability checking with capacity constraints
- Support for multiple service types and rates
- Comprehensive date and time validation
- Laravel Eloquent integration
Capacity Management
BookFlow allows multiple bookings for the same timeslot when capacity is available.
Default capacity is 1 booking per timeslot. You can change this in your model or globally in config/bookflow.php
:
Installation
Requires PHP 8.3+, and Laravel 11.0+.
You can install the package via composer:
Publish and run the migrations:
Publish the config file:
Configuration
After publishing the config file, you can configure the pricing strategies in config/bookflow.php
:
Usage
Setting Up Your Models
First, add the HasBookings
trait to your bookable model:
Managing Rates
Create and manage different pricing rates:
Basic Booking Operations
BookFlow provides multiple ways to create bookings. Here's the recommended fluent interface:
Checking Availability
Recurring Bookings
Create bookings that repeat on specific days:
Custom Pricing Strategies
Create a custom pricing strategy:
Register your custom strategy in config/bookflow.php
:
Use the custom strategy:
Additional Custom Pricing Strategy Example
Here's an example of a seasonal pricing strategy that adjusts rates based on peak seasons and special events:
Register the seasonal pricing strategy:
Use the seasonal pricing strategy:
Error Handling
BookFlow provides specific exceptions for different scenarios:
Command-Line Tools
BookFlow provides a command-line tool for checking system configuration and data integrity:
This command helps you:
- Validate rate configurations (units, minimum units, etc.)
- Detect booking conflicts and invalid booking periods
- Test pricing calculations for all rates
Testing
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security Vulnerabilities
Please review our security policy on how to report security vulnerabilities.
Credits
- alan
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of bookflow with dependencies
spatie/laravel-package-tools Version ^1.16
illuminate/contracts Version ^10.0||^11.0