Skip to content

🗓️ Availability Model

The Availability model stores schedule rules and date overrides. It is internally stored in the fcal_meta table with object_type = 'availability'.

Attributes

AttributeTypeDescription
idbigintPrimary key
object_idbigintReference ID (usually User ID)
keystringTypically stores the schedule name
valuelongtextSerialized/JSON availability rules

Methods

getAuthor()

Returns an array of author details (name, avatar) for the owner of this availability.

Relations

calendar

Typically associated with calendars that use this shared availability.

Usage Examples

Retrieving a Host's Availability

php
use FluentBooking\App\Models\Availability;

$availability = Availability::where('object_id', $userId)->first();
$rules = $availability->value; // Returns the unserialized schedule array