-
Notifications
You must be signed in to change notification settings - Fork 0
Home
Welcome to the Romega Software - Availability documentation. This package provides a powerful, rule-based availability engine for Laravel models, allowing you to define complex availability windows with a predictable evaluation strategy.
Romega Software - Availability is a flexible rule engine that lets you attach availability rules to any Eloquent model. Whether you're building a booking system, scheduling tool, or resource management platform, this package provides the infrastructure to handle complex availability logic.
- Rule-Based System - Define multiple availability rules with different types and priorities
- Predictable Evaluation - "Last matching rule wins" policy ensures consistent behavior
- Timezone Aware - All evaluations respect the subject's timezone
- Extensible - Add custom rule types and evaluators
- Laravel Native - Built for Laravel with Eloquent integration
// Add availability to your model
class Room extends Model
{
use HasAvailability;
}
// Create availability rules
$room->availabilityRules()->create([
'type' => 'weekdays',
'config' => ['days' => [1, 2, 3, 4, 5]], // Mon-Fri
'effect' => 'allow',
'priority' => 10,
]);
$room->availabilityRules()->create([
'type' => 'time_of_day',
'config' => ['from' => '09:00', 'to' => '17:00'], // 9 AM - 5 PM
'effect' => 'allow',
'priority' => 20,
]);
// Check availability
$engine = app(AvailabilityEngine::class);
if ($engine->isAvailable($room, now())) {
// Room is available
}- GitHub Issues - Report bugs or request features
- Contributing - Guidelines for contributing to the package
Romega Software is software development agency specializing in helping customers integrate AI and custom software into their business, helping companies in growth mode better acquire, visualize, and utilize their data, and helping entrepreneurs bring their ideas to life.
Installation
Set up the package in your Laravel app
Quick Start
Get running in 5 minutes
Basic Usage
Common patterns and examples
How It Works
Understanding the evaluation engine
Rule Types
Available rule types and configurations
Priority System
How rule priority affects evaluation
Inventory Gates
Dynamic availability based on stock
Custom Evaluators
Build your own rule types
Complex Scenarios
Real-world implementation patterns
Performance Tips
Optimization strategies
Configuration
Package configuration options
Models & Traits
Available models and traits
Testing
Testing your availability rules